Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimeon Andreev2017-09-20 08:15:32 +0000
committerSimeon Andreev2017-09-20 08:59:34 +0000
commitc2a10306c92c88d6bc460956e8bab8f5c0e0c473 (patch)
tree78ca9b6d4fb390141a1e15f7bd9ae98d3b3e2eea /org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleFactoryExtension.java
parentd49b76e20affb3c5788294cc2b2d99a283f53dae (diff)
downloadeclipse.platform.debug-c2a10306c92c88d6bc460956e8bab8f5c0e0c473.tar.gz
eclipse.platform.debug-c2a10306c92c88d6bc460956e8bab8f5c0e0c473.tar.xz
eclipse.platform.debug-c2a10306c92c88d6bc460956e8bab8f5c0e0c473.zip
Bug 522241 - org.eclipse.ui.console mixes tabs and spaces code indentI20170925-2000I20170924-2000I20170923-1500I20170922-2000I20170921-2000I20170920-2000
The source of org.eclipse.ui.console has a mix of tabs and spaces, in some caes on the same line. This makes editing the source very awkward. E.g. changing code and undo-ing changes results in indentation changes nevertheless (on save action). In this change space indentations are replaced with tab indentations, for the source of plug-in org.eclipse.ui.console. This follows the project formatting settings. Change-Id: I9ee197b4eeea1c2764b2e55dce55bbeb3881a64a Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
Diffstat (limited to 'org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleFactoryExtension.java')
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleFactoryExtension.java136
1 files changed, 68 insertions, 68 deletions
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleFactoryExtension.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleFactoryExtension.java
index b63793f7e..874f3f9fe 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleFactoryExtension.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleFactoryExtension.java
@@ -36,84 +36,84 @@ import org.osgi.framework.Bundle;
*/
public class ConsoleFactoryExtension implements IPluginContribution {
- private IConfigurationElement fConfig;
- private Expression fEnablementExpression;
- private String fLabel;
- private ImageDescriptor fImageDescriptor;
- private IConsoleFactory fFactory;
-
- ConsoleFactoryExtension(IConfigurationElement config) {
- fConfig = config;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPluginContribution#getLocalId()
- */
+ private IConfigurationElement fConfig;
+ private Expression fEnablementExpression;
+ private String fLabel;
+ private ImageDescriptor fImageDescriptor;
+ private IConsoleFactory fFactory;
+
+ ConsoleFactoryExtension(IConfigurationElement config) {
+ fConfig = config;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IPluginContribution#getLocalId()
+ */
@Override
public String getLocalId() {
- return fConfig.getAttribute("id"); //$NON-NLS-1$
- }
+ return fConfig.getAttribute("id"); //$NON-NLS-1$
+ }
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPluginContribution#getPluginId()
- */
- @Override
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IPluginContribution#getPluginId()
+ */
+ @Override
public String getPluginId() {
- return fConfig.getContributor().getName();
- }
-
- public boolean isEnabled() {
- try {
- Expression enablementExpression = getEnablementExpression();
- if (enablementExpression == null) {
- return true;
- }
- EvaluationContext context = new EvaluationContext(null, this);
- EvaluationResult evaluationResult = enablementExpression.evaluate(context);
- return evaluationResult != EvaluationResult.FALSE;
- } catch (CoreException e) {
- ConsolePlugin.log(e);
- return false;
- }
- }
-
- public Expression getEnablementExpression() throws CoreException {
+ return fConfig.getContributor().getName();
+ }
+
+ public boolean isEnabled() {
+ try {
+ Expression enablementExpression = getEnablementExpression();
+ if (enablementExpression == null) {
+ return true;
+ }
+ EvaluationContext context = new EvaluationContext(null, this);
+ EvaluationResult evaluationResult = enablementExpression.evaluate(context);
+ return evaluationResult != EvaluationResult.FALSE;
+ } catch (CoreException e) {
+ ConsolePlugin.log(e);
+ return false;
+ }
+ }
+
+ public Expression getEnablementExpression() throws CoreException {
if (fEnablementExpression == null) {
IConfigurationElement[] elements = fConfig.getChildren(ExpressionTagNames.ENABLEMENT);
IConfigurationElement enablement = elements.length > 0 ? elements[0] : null;
if (enablement != null) {
- fEnablementExpression = ExpressionConverter.getDefault().perform(enablement);
+ fEnablementExpression = ExpressionConverter.getDefault().perform(enablement);
}
}
return fEnablementExpression;
- }
-
- public String getLabel() {
- if (fLabel == null) {
- fLabel = fConfig.getAttribute("label"); //$NON-NLS-1$
- }
- return fLabel;
- }
-
- public ImageDescriptor getImageDescriptor() {
- if (fImageDescriptor == null) {
- String path = fConfig.getAttribute("icon"); //$NON-NLS-1$
- if (path != null) {
- Bundle bundle = Platform.getBundle(getPluginId());
- URL url = FileLocator.find(bundle, new Path(path), null);
- if (url != null) {
- fImageDescriptor = ImageDescriptor.createFromURL(url);
- }
- }
- }
- return fImageDescriptor;
- }
-
- public IConsoleFactory createFactory() throws CoreException {
- if (fFactory == null) {
- fFactory = (IConsoleFactory) fConfig.createExecutableExtension("class"); //$NON-NLS-1$
- }
- return fFactory;
- }
+ }
+
+ public String getLabel() {
+ if (fLabel == null) {
+ fLabel = fConfig.getAttribute("label"); //$NON-NLS-1$
+ }
+ return fLabel;
+ }
+
+ public ImageDescriptor getImageDescriptor() {
+ if (fImageDescriptor == null) {
+ String path = fConfig.getAttribute("icon"); //$NON-NLS-1$
+ if (path != null) {
+ Bundle bundle = Platform.getBundle(getPluginId());
+ URL url = FileLocator.find(bundle, new Path(path), null);
+ if (url != null) {
+ fImageDescriptor = ImageDescriptor.createFromURL(url);
+ }
+ }
+ }
+ return fImageDescriptor;
+ }
+
+ public IConsoleFactory createFactory() throws CoreException {
+ if (fFactory == null) {
+ fFactory = (IConsoleFactory) fConfig.createExecutableExtension("class"); //$NON-NLS-1$
+ }
+ return fFactory;
+ }
}

Back to the top