Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2015-07-23 08:27:21 +0000
committerCamille Letavernier2015-07-23 08:27:21 +0000
commitd7f95be54bb8500fabc73c4b366206f6ddb73dc1 (patch)
tree86cdf23a779a175fc01326703591c07e5e5af11c /plugins/customization
parent6c3e823190d08b0e38b17f48955933369dee1173 (diff)
downloadorg.eclipse.papyrus-d7f95be54bb8500fabc73c4b366206f6ddb73dc1.tar.gz
org.eclipse.papyrus-d7f95be54bb8500fabc73c4b366206f6ddb73dc1.tar.xz
org.eclipse.papyrus-d7f95be54bb8500fabc73c4b366206f6ddb73dc1.zip
443799: [Code Quality] Cleanup code according to FindBugs results
https://bugs.eclipse.org/bugs/show_bug.cgi?id=443799 - Fix additional issues in some infra and customization bundles
Diffstat (limited to 'plugins/customization')
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/BundleExplorerDialog.java2
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/PaletteLocalSeparatorProxy.java2
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/PaletteLocalStackProxy.java2
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/AbstractQVTGenerator.java15
4 files changed, 8 insertions, 13 deletions
diff --git a/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/BundleExplorerDialog.java b/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/BundleExplorerDialog.java
index 8ae2fc5e322..fed5f51c1c6 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/BundleExplorerDialog.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/BundleExplorerDialog.java
@@ -145,7 +145,7 @@ public class BundleExplorerDialog extends FilteredItemsSelectionDialog {
@Override
protected boolean matches(String text) {
String pattern = patternMatcher.getPattern();
- if (pattern.indexOf("*") != 0 & pattern.indexOf("?") != 0 & pattern.indexOf(".") != 0) {//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ if (pattern.indexOf("*") != 0 && pattern.indexOf("?") != 0 && pattern.indexOf(".") != 0) {//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
pattern = "*" + pattern; //$NON-NLS-1$
patternMatcher.setPattern(pattern);
}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/PaletteLocalSeparatorProxy.java b/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/PaletteLocalSeparatorProxy.java
index 6162eabf9a4..ba69166cf28 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/PaletteLocalSeparatorProxy.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/PaletteLocalSeparatorProxy.java
@@ -26,7 +26,7 @@ public class PaletteLocalSeparatorProxy extends PaletteEntryProxy {
protected String id;
/** icon for separators */
- public static String SEPARATOR_ICON = "/icons/separator.gif";
+ public static final String SEPARATOR_ICON = "/icons/separator.gif";
/**
* Creates a new PaletteLocalEntryProxy
diff --git a/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/PaletteLocalStackProxy.java b/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/PaletteLocalStackProxy.java
index 9be7196e8b5..b9472ca434c 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/PaletteLocalStackProxy.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/PaletteLocalStackProxy.java
@@ -26,7 +26,7 @@ public class PaletteLocalStackProxy extends PaletteContainerProxy {
protected String id;
/** icon for separators */
- public static String STACK_ICON = "/icons/stack.gif";
+ public static final String STACK_ICON = "/icons/stack.gif";
/**
* Creates a new PaletteLocalEntryProxy
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/AbstractQVTGenerator.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/AbstractQVTGenerator.java
index c2082f9fe1e..1adfbbb1bd0 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/AbstractQVTGenerator.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/AbstractQVTGenerator.java
@@ -15,7 +15,6 @@
package org.eclipse.papyrus.customization.properties.generation.generators;
import java.io.IOException;
-import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
@@ -37,7 +36,6 @@ import org.eclipse.m2m.qvt.oml.ExecutionContextImpl;
import org.eclipse.m2m.qvt.oml.ExecutionDiagnostic;
import org.eclipse.m2m.qvt.oml.ModelExtent;
import org.eclipse.m2m.qvt.oml.TransformationExecutor;
-import org.eclipse.m2m.qvt.oml.util.WriterLog;
import org.eclipse.papyrus.customization.properties.generation.Activator;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.views.properties.contexts.Context;
@@ -126,7 +124,7 @@ public abstract class AbstractQVTGenerator implements IGenerator, Listener {
* @param uri
* The URI from which the EObject is loaded
* @return
- * The loaded EObject, or null if an error occured
+ * The loaded EObject, or null if an error occured
* @throws IOException
* If the URI isn't a valid EObject
*/
@@ -175,7 +173,7 @@ public abstract class AbstractQVTGenerator implements IGenerator, Listener {
* @param outObjects
* The list of EObjects from which the context will be retrieved
* @return
- * The main generated context
+ * The main generated context
*/
protected List<Context> getContexts(List<EObject> outObjects) {
List<Context> result = new LinkedList<Context>();
@@ -211,7 +209,8 @@ public abstract class AbstractQVTGenerator implements IGenerator, Listener {
ExecutionContextImpl context = new ExecutionContextImpl();
context.setConfigProperty("keepModeling", true); //$NON-NLS-1$
- context.setLog(new WriterLog(new OutputStreamWriter(System.out)));
+
+ // context.setLog(new WriterLog(new OutputStreamWriter(System.out)));
ExecutionDiagnostic result = executor.execute(context, extents.toArray(new ModelExtent[0]));
@@ -234,12 +233,8 @@ public abstract class AbstractQVTGenerator implements IGenerator, Listener {
return generatedContexts = null;
}
-
-
-
protected abstract List<ModelExtent> getModelExtents(int i);
-
private List<Context> generateDifferentFile(List<URI> targetURI) {
URI transformationURI = getTransformationURI();
@@ -253,7 +248,7 @@ public abstract class AbstractQVTGenerator implements IGenerator, Listener {
List<ModelExtent> extents = null;
ExecutionContextImpl context = new ExecutionContextImpl();
context.setConfigProperty("keepModeling", true); //$NON-NLS-1$
- context.setLog(new WriterLog(new OutputStreamWriter(System.out)));
+ // context.setLog(new WriterLog(new OutputStreamWriter(System.out)));
List<Context> temp = new LinkedList<Context>();
for (int i = 0; i < targetURI.size(); i++) {

Back to the top