Skip to content
Permalink
Browse files

reformat

  • Loading branch information...
vladdu committed Mar 5, 2019
1 parent 6493db6 commit 3ae841f90bd7f21aef4400e1abe5f9aff59b8602
Showing 685 changed files with 16,011 additions and 16,326 deletions.
@@ -1,12 +1,10 @@
/*******************************************************************************
* Copyright (c) 2010 György Orosz.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* Copyright (c) 2010 György Orosz. All rights reserved. This program and the accompanying
* materials are made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* György Orosz - initial API and implementation
* Contributors: György Orosz - initial API and implementation
******************************************************************************/
package org.erlide.wrangler.refactoring.core.exception;

@@ -20,20 +18,20 @@
*/
public class WranglerRefactoringException extends WranglerException {

/**
* Constructor
*
* @param message
* error message
*/
public WranglerRefactoringException(final String message) {
super(message);
/**
* Constructor
*
* @param message
* error message
*/
public WranglerRefactoringException(final String message) {
super(message);

}
}

/**
*
*/
private static final long serialVersionUID = -3593105842104036784L;
/**
*
*/
private static final long serialVersionUID = -3593105842104036784L;

}
@@ -1,12 +1,10 @@
/*******************************************************************************
* Copyright (c) 2010 György Orosz.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* Copyright (c) 2010 György Orosz. All rights reserved. This program and the accompanying
* materials are made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* György Orosz - initial API and implementation
* Contributors: György Orosz - initial API and implementation
******************************************************************************/
package org.erlide.wrangler.refactoring.core.exception;

@@ -20,14 +18,14 @@
*/
public class WranglerWarningException extends WranglerException {

protected WranglerWarningException(final String message) {
super(message);
protected WranglerWarningException(final String message) {
super(message);

}
}

/**
*
*/
private static final long serialVersionUID = 1L;
/**
*
*/
private static final long serialVersionUID = 1L;

}
@@ -1,12 +1,10 @@
/*******************************************************************************
* Copyright (c) 2010 György Orosz.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* Copyright (c) 2010 György Orosz. All rights reserved. This program and the accompanying
* materials are made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* György Orosz - initial API and implementation
* Contributors: György Orosz - initial API and implementation
******************************************************************************/
package org.erlide.wrangler.refactoring.duplicatedcode;

@@ -28,67 +26,69 @@
*
*/
public class DuplicatesUIManager {
/**
* Duplicated view ID.
*/
public static final String duplicatedView = "org.erlide.wrangler.refactoring.duplicatedcode.views.DuplicatedCodeView";
// private static List<DuplicatedCode> result;
private static IDuplicatedCodeResultDisplayer dupDisplayer;
/**
* Duplicated view ID.
*/
public static final String duplicatedView = "org.erlide.wrangler.refactoring.duplicatedcode.views.DuplicatedCodeView";
// private static List<DuplicatedCode> result;
private static IDuplicatedCodeResultDisplayer dupDisplayer;

private DuplicatesUIManager() {
}
private DuplicatesUIManager() {
}

/**
* Stores the view object
*
* @param displayer
* duplicates view
*/
public static void setDuplicatedCodeResultDisplayer(final IDuplicatedCodeResultDisplayer displayer) {
DuplicatesUIManager.dupDisplayer = displayer;
}
/**
* Stores the view object
*
* @param displayer
* duplicates view
*/
public static void setDuplicatedCodeResultDisplayer(
final IDuplicatedCodeResultDisplayer displayer) {
DuplicatesUIManager.dupDisplayer = displayer;
}

/**
* Sets the duplicates in the view.
*
* @param root
* list of the duplicates
*/
public static void setRefactoringResults(final List<DuplicatedCodeElement> root) {
DuplicatesUIManager.dupDisplayer.showResult(root);
}
/**
* Sets the duplicates in the view.
*
* @param root
* list of the duplicates
*/
public static void setRefactoringResults(final List<DuplicatedCodeElement> root) {
DuplicatesUIManager.dupDisplayer.showResult(root);
}

/**
* Shows the duplicates view.
*/
public static void showDuplicatesView() {
final IWorkbench workbench = PlatformUI.getWorkbench();
/**
* Shows the duplicates view.
*/
public static void showDuplicatesView() {
final IWorkbench workbench = PlatformUI.getWorkbench();

final IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
try {
final IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
try {

@SuppressWarnings("unused")
final IViewPart view = window.getActivePage().showView(DuplicatesUIManager.duplicatedView);
@SuppressWarnings("unused")
final IViewPart view = window.getActivePage()
.showView(DuplicatesUIManager.duplicatedView);

} catch (final PartInitException e) {
ErlLogger.error(e);
}
}
} catch (final PartInitException e) {
ErlLogger.error(e);
}
}

/**
* Hide the duplicates view.
*/
public static void closeDuplicatesView() {
final IWorkbench workbench = PlatformUI.getWorkbench();
/**
* Hide the duplicates view.
*/
public static void closeDuplicatesView() {
final IWorkbench workbench = PlatformUI.getWorkbench();

final IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
IViewPart view;
try {
view = window.getActivePage().showView(DuplicatesUIManager.duplicatedView);
window.getActivePage().hideView(view);
} catch (final PartInitException e) {
ErlLogger.error(e);
}
final IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
IViewPart view;
try {
view = window.getActivePage().showView(DuplicatesUIManager.duplicatedView);
window.getActivePage().hideView(view);
} catch (final PartInitException e) {
ErlLogger.error(e);
}

}
}
}
@@ -1,12 +1,10 @@
/*******************************************************************************
* Copyright (c) 2010 György Orosz.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* Copyright (c) 2010 György Orosz. All rights reserved. This program and the accompanying
* materials are made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* György Orosz - initial API and implementation
* Contributors: György Orosz - initial API and implementation
******************************************************************************/
package org.erlide.wrangler.refactoring.duplicatedcode.actions;

@@ -22,28 +20,28 @@
*
*/
public class ClipboardAction extends Action {
private final Display display;
private String text;
private final Display display;
private String text;

/**
* Constructor
*
* @param display
* actual SWT display
*/
public ClipboardAction(final Display display) {
this.display = display;
}
/**
* Constructor
*
* @param display
* actual SWT display
*/
public ClipboardAction(final Display display) {
this.display = display;
}

@Override
public void run() {
final Clipboard cb = new Clipboard(display);
final TextTransfer textTransfer = TextTransfer.getInstance();
cb.setContents(new Object[] { text }, new TextTransfer[] { textTransfer });
}
@Override
public void run() {
final Clipboard cb = new Clipboard(display);
final TextTransfer textTransfer = TextTransfer.getInstance();
cb.setContents(new Object[] { text }, new TextTransfer[] { textTransfer });
}

@Override
public void setText(final String text) {
this.text = text;
}
@Override
public void setText(final String text) {
this.text = text;
}
}
@@ -1,12 +1,10 @@
/*******************************************************************************
* Copyright (c) 2010 György Orosz.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* Copyright (c) 2010 György Orosz. All rights reserved. This program and the accompanying
* materials are made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* György Orosz - initial API and implementation
* Contributors: György Orosz - initial API and implementation
******************************************************************************/
package org.erlide.wrangler.refactoring.duplicatedcode.core;

@@ -24,37 +22,37 @@
*/
public abstract class AbstractDuplicatesParser implements IResultParser {

protected String errorMessage;
protected boolean isSuccessful;
protected List<DuplicatedCodeElement> duplicates;

/**
* Constructor
*
* @param obj
* object to be parsed
*/
public AbstractDuplicatesParser(final OtpErlangObject obj) {
parse(obj);
}

@Override
public List<DuplicatedCodeElement> getDuplicates() {
return duplicates;
}

@Override
public String getErrorMessage() {
return errorMessage;
}

@Override
public boolean isSuccessful() {
return isSuccessful;
}

protected void setUnSuccessful(final String errorMessage) {
isSuccessful = false;
this.errorMessage = errorMessage;
}
protected String errorMessage;
protected boolean isSuccessful;
protected List<DuplicatedCodeElement> duplicates;

/**
* Constructor
*
* @param obj
* object to be parsed
*/
public AbstractDuplicatesParser(final OtpErlangObject obj) {
parse(obj);
}

@Override
public List<DuplicatedCodeElement> getDuplicates() {
return duplicates;
}

@Override
public String getErrorMessage() {
return errorMessage;
}

@Override
public boolean isSuccessful() {
return isSuccessful;
}

protected void setUnSuccessful(final String errorMessage) {
isSuccessful = false;
this.errorMessage = errorMessage;
}
}

0 comments on commit 3ae841f

Please sign in to comment.
You can’t perform that action at this time.