Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas FAUVERGUE2018-07-24 13:54:59 +0000
committerNicolas FAUVERGUE2018-07-24 15:15:25 +0000
commit3e5515be88c0effc49a73e05a53dab4acad08dd3 (patch)
treea7d7fe798c33e15ef5757bebdf808ee5e1f61b15
parentec44cc67c1952fee9750360ba128a8e4e7d9a654 (diff)
downloadorg.eclipse.papyrus-3e5515be88c0effc49a73e05a53dab4acad08dd3.tar.gz
org.eclipse.papyrus-3e5515be88c0effc49a73e05a53dab4acad08dd3.tar.xz
org.eclipse.papyrus-3e5515be88c0effc49a73e05a53dab4acad08dd3.zip
Fix some simple things in emf command stack view.
Change-Id: I5a8ad22e7b4d7ec7b8c151efdc448f44f462d790 Signed-off-by: Vincent Lorenzo <vincent.lorenzo@cea.fr> Signed-off-by: Nicolas FAUVERGUE <nicolas.fauvergue@cea.fr>
-rw-r--r--plugins/toolsmiths/org.eclipse.papyrus.infra.emf.commandstack/META-INF/MANIFEST.MF2
-rw-r--r--plugins/toolsmiths/org.eclipse.papyrus.infra.emf.commandstack/build.properties1
-rw-r--r--plugins/toolsmiths/org.eclipse.papyrus.infra.emf.commandstack/plugin.properties4
-rw-r--r--plugins/toolsmiths/org.eclipse.papyrus.infra.emf.commandstack/src/org/eclipse/papyrus/infra/emf/commandstack/view/CommandStackView.java36
4 files changed, 22 insertions, 21 deletions
diff --git a/plugins/toolsmiths/org.eclipse.papyrus.infra.emf.commandstack/META-INF/MANIFEST.MF b/plugins/toolsmiths/org.eclipse.papyrus.infra.emf.commandstack/META-INF/MANIFEST.MF
index 1160d97c517..b7a8e825a0d 100644
--- a/plugins/toolsmiths/org.eclipse.papyrus.infra.emf.commandstack/META-INF/MANIFEST.MF
+++ b/plugins/toolsmiths/org.eclipse.papyrus.infra.emf.commandstack/META-INF/MANIFEST.MF
@@ -11,7 +11,7 @@ Bundle-Name: %pluginName
Bundle-Localization: plugin
Bundle-ManifestVersion: 2
Bundle-Activator: org.eclipse.papyrus.infra.emf.commandstack.Activator
-Bundle-Description: This plugin allows to show the command owned by the emf command stack
+Bundle-Description: This plugin allows to show the commands owned by the emf command stack
Bundle-SymbolicName: org.eclipse.papyrus.infra.emf.commandstack;singleton:=true
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Automatic-Module-Name: org.eclipse.papyrus.infra.emf.commandstack
diff --git a/plugins/toolsmiths/org.eclipse.papyrus.infra.emf.commandstack/build.properties b/plugins/toolsmiths/org.eclipse.papyrus.infra.emf.commandstack/build.properties
index 69d0f2e3ef2..4d648cc85db 100644
--- a/plugins/toolsmiths/org.eclipse.papyrus.infra.emf.commandstack/build.properties
+++ b/plugins/toolsmiths/org.eclipse.papyrus.infra.emf.commandstack/build.properties
@@ -6,3 +6,4 @@ bin.includes = META-INF/,\
plugin.properties,\
icons/,\
about.html
+src.includes = about.html
diff --git a/plugins/toolsmiths/org.eclipse.papyrus.infra.emf.commandstack/plugin.properties b/plugins/toolsmiths/org.eclipse.papyrus.infra.emf.commandstack/plugin.properties
index ccae23170cd..0c16d968fea 100644
--- a/plugins/toolsmiths/org.eclipse.papyrus.infra.emf.commandstack/plugin.properties
+++ b/plugins/toolsmiths/org.eclipse.papyrus.infra.emf.commandstack/plugin.properties
@@ -1,5 +1,5 @@
-#Properties file for org.eclipse.papyrus.emf.commandstack
+#Properties file for org.eclipse.papyrus.infra.emf.commandstack
providerName = Eclipse Modeling Project
-pluginName = A View for the commandstack
+pluginName = Papyrus View for the commandstack
view.name = Command Stack
category.name = Papyrus Dev
diff --git a/plugins/toolsmiths/org.eclipse.papyrus.infra.emf.commandstack/src/org/eclipse/papyrus/infra/emf/commandstack/view/CommandStackView.java b/plugins/toolsmiths/org.eclipse.papyrus.infra.emf.commandstack/src/org/eclipse/papyrus/infra/emf/commandstack/view/CommandStackView.java
index da126f1fda0..c5028bb0e22 100644
--- a/plugins/toolsmiths/org.eclipse.papyrus.infra.emf.commandstack/src/org/eclipse/papyrus/infra/emf/commandstack/view/CommandStackView.java
+++ b/plugins/toolsmiths/org.eclipse.papyrus.infra.emf.commandstack/src/org/eclipse/papyrus/infra/emf/commandstack/view/CommandStackView.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* Copyright (c) 2011 CEA LIST.
*
- *
+ *
* 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
@@ -51,9 +51,9 @@ public class CommandStackView extends AbstractTreeView {
private final IOperationHistory history;
- private final List<IUndoableOperation> commandList = new ArrayList<IUndoableOperation>();
+ private final List<IUndoableOperation> commandList = new ArrayList<>();
- private final Map<IUndoableOperation, String> dates = new HashMap<IUndoableOperation, String>();
+ private final Map<IUndoableOperation, String> dates = new HashMap<>();
private final IOperationHistoryListener historyListener;
@@ -69,7 +69,7 @@ public class CommandStackView extends AbstractTreeView {
dates.remove(removedOperation);
}
CommandStackView.this.commandList.add(0, event.getOperation());
- final DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");
+ final DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss"); //$NON-NLS-1$
final Calendar cal = Calendar.getInstance();
CommandStackView.this.dates.put(event.getOperation(), dateFormat.format(cal.getTime()));
refresh(true);
@@ -120,7 +120,7 @@ public class CommandStackView extends AbstractTreeView {
@Override
public String getText() {
- return "Clear the view";
+ return "Clear the view"; //$NON-NLS-1$
}
});
}
@@ -133,7 +133,7 @@ public class CommandStackView extends AbstractTreeView {
return element.getClass().getName();
}
};
- createColumn("Type", "TYPE_COLUMN_ID", 200, columnLabelProvider);
+ createColumn("Type", "TYPE_COLUMN_ID", 200, columnLabelProvider); //$NON-NLS-1$ //$NON-NLS-2$
}
protected void createNameColumn() {
@@ -144,7 +144,7 @@ public class CommandStackView extends AbstractTreeView {
return CommandUtils.getLabel(element);
}
};
- createColumn("Name", "NAME_COLUMN_ID", 200, columnLabelProvider);
+ createColumn("Name", "NAME_COLUMN_ID", 200, columnLabelProvider); //$NON-NLS-1$ //$NON-NLS-2$
}
protected void createUndoContextColumn() {
@@ -155,10 +155,10 @@ public class CommandStackView extends AbstractTreeView {
if (element instanceof IUndoableOperation) {
return Boolean.toString(isValidUndoContext((IUndoableOperation) element));
}
- return "?";
+ return "?"; //$NON-NLS-1$
}
};
- createColumn("EMF Command Stack", "UNDO_CONTEXT_COLUMN_ID", 100, columnLabelProvider);
+ createColumn("EMF Command Stack", "UNDO_CONTEXT_COLUMN_ID", 100, columnLabelProvider); //$NON-NLS-1$ //$NON-NLS-2$
}
protected void createDescriptionColumn() {
@@ -169,10 +169,10 @@ public class CommandStackView extends AbstractTreeView {
if (element instanceof AbstractCommand) {
return ((AbstractCommand) element).getDescription();
}
- return "no description";
+ return "no description"; //$NON-NLS-1$
}
};
- createColumn("Description", "DESCRIPTION_COLUMN_ID", 150, columnLabelProvider);
+ createColumn("Description", "DESCRIPTION_COLUMN_ID", 150, columnLabelProvider); //$NON-NLS-1$ //$NON-NLS-2$
}
protected void createTimeColumn() {
@@ -183,10 +183,10 @@ public class CommandStackView extends AbstractTreeView {
if (CommandStackView.this.dates.containsKey(element)) {
return CommandStackView.this.dates.get(element);
}
- return "";
+ return ""; //$NON-NLS-1$
}
};
- createColumn("Time", "TIME_COLUMN_ID", 100, columnLabelProvider);
+ createColumn("Time", "TIME_COLUMN_ID", 100, columnLabelProvider); //$NON-NLS-1$ //$NON-NLS-2$
}
@Override
@@ -228,20 +228,20 @@ public class CommandStackView extends AbstractTreeView {
if (parentElement instanceof CompoundCommand) {
return ((CompoundCommand) parentElement).getCommandList().toArray();
} else if (parentElement instanceof CompositeCommand) {
- final List<Object> children = new ArrayList<Object>();
+ final List<Object> children = new ArrayList<>();
final ListIterator<Object> iter = ((CompositeCommand) parentElement).listIterator();
while (iter.hasNext()) {
children.add(iter.next());
}
return children.toArray();
} else if (parentElement instanceof EMFCommandOperation) {
- final List<Object> children = new ArrayList<Object>();
+ final List<Object> children = new ArrayList<>();
children.add(((EMFCommandOperation) parentElement).getCommand());
return children.toArray();
} else if (parentElement instanceof ICommandWrapper<?>) {
return new Object[] { ((ICommandWrapper<?>) parentElement).getWrappedCommand() };
} else if (CommandUtils.isCompound(parentElement)) {
- final List<Object> children = new ArrayList<Object>();
+ final List<Object> children = new ArrayList<>();
for (Object next : CommandUtils.getChildren(parentElement)) {
children.add(next);
}
@@ -256,12 +256,12 @@ public class CommandStackView extends AbstractTreeView {
@Override
protected void openElement(final Object element) {
-
+
}
@Override
protected String getRefreshMessage() {
- return "Refresh CommandStack View";
+ return "Refresh CommandStack View"; //$NON-NLS-1$
}
private Object result[];// = new Object[1];

Back to the top