Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/ExpressionContext.java56
-rw-r--r--bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/internal/Activator.java12
-rw-r--r--bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/internal/CommandServiceImpl.java1
-rw-r--r--bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/internal/HandlerServiceImpl.java23
4 files changed, 16 insertions, 76 deletions
diff --git a/bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/ExpressionContext.java b/bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/ExpressionContext.java
index b2000d87b21..18dc2cf0eb3 100644
--- a/bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/ExpressionContext.java
+++ b/bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/ExpressionContext.java
@@ -36,21 +36,13 @@ public class ExpressionContext implements IEvaluationContext {
this.eclipseContext = eclipseContext;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.expressions.IEvaluationContext#getParent()
- */
+ @Override
public IEvaluationContext getParent() {
IEclipseContext parent = eclipseContext.getParent();
return parent == null ? null : new ExpressionContext(parent);
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.expressions.IEvaluationContext#getRoot()
- */
+ @Override
public IEvaluationContext getRoot() {
IEclipseContext current = eclipseContext;
IEclipseContext parent = current.getParent();
@@ -64,30 +56,18 @@ public class ExpressionContext implements IEvaluationContext {
return new ExpressionContext(current);
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.expressions.IEvaluationContext#setAllowPluginActivation(boolean)
- */
+ @Override
public void setAllowPluginActivation(boolean value) {
eclipseContext.set(ALLOW_ACTIVATION, Boolean.valueOf(value));
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.expressions.IEvaluationContext#getAllowPluginActivation()
- */
+ @Override
public boolean getAllowPluginActivation() {
Object obj = eclipseContext.get(ALLOW_ACTIVATION);
return obj instanceof Boolean ? ((Boolean) obj).booleanValue() : false;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.expressions.IEvaluationContext#getDefaultVariable()
- */
+ @Override
public Object getDefaultVariable() {
final Object sel;
if (defaultVariableConverter != null) {
@@ -98,32 +78,19 @@ public class ExpressionContext implements IEvaluationContext {
return sel == null ? Collections.EMPTY_LIST : sel;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.expressions.IEvaluationContext#addVariable(java.lang.String,
- * java.lang.Object)
- */
+ @Override
public void addVariable(String name, Object value) {
eclipseContext.set(name, value);
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.expressions.IEvaluationContext#removeVariable(java.lang.String)
- */
+ @Override
public Object removeVariable(String name) {
Object obj = eclipseContext.getLocal(name);
eclipseContext.remove(name);
return obj;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.expressions.IEvaluationContext#getVariable(java.lang.String)
- */
+ @Override
public Object getVariable(String name) {
if (IEclipseContext.class.getName().equals(name)) {
return eclipseContext;
@@ -132,12 +99,7 @@ public class ExpressionContext implements IEvaluationContext {
return obj == null ? IEvaluationContext.UNDEFINED_VARIABLE : obj;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.expressions.IEvaluationContext#resolveVariable(java.lang.String,
- * java.lang.Object[])
- */
+ @Override
public Object resolveVariable(String name, Object[] args) throws CoreException {
// TODO Auto-generated method stub
return null;
diff --git a/bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/internal/Activator.java b/bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/internal/Activator.java
index 48eda5999c5..c88b25789d4 100644
--- a/bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/internal/Activator.java
+++ b/bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/internal/Activator.java
@@ -24,20 +24,12 @@ public class Activator implements BundleActivator {
// The shared instance
private static Activator plugin;
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
- */
+ @Override
public void start(BundleContext context) throws Exception {
plugin = this;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- */
+ @Override
public void stop(BundleContext context) throws Exception {
plugin = null;
}
diff --git a/bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/internal/CommandServiceImpl.java b/bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/internal/CommandServiceImpl.java
index 62937a20203..76ebeb15b2f 100644
--- a/bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/internal/CommandServiceImpl.java
+++ b/bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/internal/CommandServiceImpl.java
@@ -70,5 +70,4 @@ public class CommandServiceImpl implements ECommandService {
public Command getCommand(String commandId) {
return commandManager.getCommand(commandId);
}
-
}
diff --git a/bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/internal/HandlerServiceImpl.java b/bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/internal/HandlerServiceImpl.java
index eb8ca5dc2b7..905fb877c53 100644
--- a/bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/internal/HandlerServiceImpl.java
+++ b/bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/internal/HandlerServiceImpl.java
@@ -152,12 +152,7 @@ public class HandlerServiceImpl implements EHandlerService {
@Optional
Logger logger;
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.e4.core.commands.EHandlerService#activateHandler(java.lang.String,
- * java.lang.Object)
- */
+ @Override
public void activateHandler(String commandId, Object handler) {
String handlerId = H_ID + commandId;
context.set(handlerId, handler);
@@ -172,6 +167,7 @@ public class HandlerServiceImpl implements EHandlerService {
}
}
+ @Override
public boolean canExecute(ParameterizedCommand command, IEclipseContext staticContext) {
final IEclipseContext executionContext = getExecutionContext();
addParms(command, staticContext);
@@ -187,22 +183,12 @@ public class HandlerServiceImpl implements EHandlerService {
}
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.e4.core.commands.EHandlerService#deactivateHandler(java.lang.String,
- * java.lang.Object)
- */
+ @Override
public void deactivateHandler(String commandId, Object handler) {
context.remove(H_ID + commandId);
}
- /*
- * (non-Javadoc)
- *
- * @seeorg.eclipse.e4.core.commands.EHandlerService#executeHandler(org.eclipse.core.commands.
- * ParameterizedCommand)
- */
+ @Override
public Object executeHandler(ParameterizedCommand command) {
final IEclipseContext staticContext = EclipseContextFactory.create(TMP_STATIC_CONTEXT);
try {
@@ -212,6 +198,7 @@ public class HandlerServiceImpl implements EHandlerService {
}
}
+ @Override
public Object executeHandler(ParameterizedCommand command, IEclipseContext staticContext) {
final IEclipseContext executionContext = getExecutionContext();
addParms(command, staticContext);

Back to the top