diff options
author | Alexander Kurtakov | 2016-04-13 19:31:04 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2016-04-13 19:46:00 +0000 |
commit | 4c4b91b85fdffcf6061325f553224db8ba03c712 (patch) | |
tree | c04e897e13db20601ee3d90f93f96bc676a8d2b7 | |
parent | a9fc6c564c6c670ab6c2fa4a7da42ae3d3a28e2e (diff) | |
download | org.eclipse.dltk.tcl-4c4b91b85fdffcf6061325f553224db8ba03c712.tar.gz org.eclipse.dltk.tcl-4c4b91b85fdffcf6061325f553224db8ba03c712.tar.xz org.eclipse.dltk.tcl-4c4b91b85fdffcf6061325f553224db8ba03c712.zip |
Modernize o.e.dltk.tcl.debug.ui.
* Add missing @Override.
* Generify.
* Add missing copyright headers.
Change-Id: I36ea74b9c040a254b85e052d5e355b7dad7527fd
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
31 files changed, 265 insertions, 225 deletions
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/console/ui/TclConsoleCompletionProcessor.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/console/ui/TclConsoleCompletionProcessor.java index ee74cf55..3eb5b403 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/console/ui/TclConsoleCompletionProcessor.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/console/ui/TclConsoleCompletionProcessor.java @@ -1,11 +1,10 @@ /******************************************************************************* - * Copyright (c) 2005, 2007 IBM Corporation and others. + * Copyright (c) 2005, 2016 IBM Corporation and others. * 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 * - *******************************************************************************/ package org.eclipse.dltk.tcl.internal.console.ui; @@ -78,10 +77,12 @@ public class TclConsoleCompletionProcessor extends super(interpreterShell); } + @Override public char[] getCompletionProposalAutoActivationCharacters() { return new char[] { '$' }; } + @Override protected ICompletionProposal[] computeCompletionProposalsImpl( IScriptConsoleViewer viewer, int offset) { @@ -103,6 +104,7 @@ public class TclConsoleCompletionProcessor extends return new ICompletionProposal[] {}; } + @Override protected IContextInformation[] computeContextInformationImpl( ITextViewer viewer, int offset) { return null; diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/console/ui/TclConsoleTextHover.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/console/ui/TclConsoleTextHover.java index 262c3c9e..cc20a788 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/console/ui/TclConsoleTextHover.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/console/ui/TclConsoleTextHover.java @@ -1,11 +1,10 @@ /******************************************************************************* - * Copyright (c) 2005, 2007 IBM Corporation and others. + * Copyright (c) 2005, 2016 IBM Corporation and others. * 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 * - *******************************************************************************/ package org.eclipse.dltk.tcl.internal.console.ui; @@ -25,6 +24,7 @@ public class TclConsoleTextHover extends ScriptConsoleTextHover { this.interpreterShell = interpreterShell; } + @Override protected String getHoverInfoImpl(IScriptConsoleViewer viewer, IRegion hoverRegion) { try { diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/console/ui/actions/PasteTclScriptToConsole.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/console/ui/actions/PasteTclScriptToConsole.java index 22b9a35b..8750285a 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/console/ui/actions/PasteTclScriptToConsole.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/console/ui/actions/PasteTclScriptToConsole.java @@ -1,11 +1,10 @@ /******************************************************************************* - * Copyright (c) 2005, 2007 IBM Corporation and others. + * Copyright (c) 2005, 2016 IBM Corporation and others. * 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 * - *******************************************************************************/ package org.eclipse.dltk.tcl.internal.console.ui.actions; @@ -49,7 +48,7 @@ public class PasteTclScriptToConsole implements IObjectActionDelegate { if (selection instanceof IStructuredSelection) { IStructuredSelection sel = (IStructuredSelection) selection; - for (Iterator iterator2 = sel.iterator(); iterator2.hasNext();) { + for (Iterator<?> iterator2 = sel.iterator(); iterator2.hasNext();) { Object obj = iterator2.next(); String text = null; if (obj instanceof ISourceModule) { diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/console/ui/preferences/TclConsolePreferenceInitializer.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/console/ui/preferences/TclConsolePreferenceInitializer.java index 0f966276..6a4cbf14 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/console/ui/preferences/TclConsolePreferenceInitializer.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/console/ui/preferences/TclConsolePreferenceInitializer.java @@ -1,11 +1,10 @@ /******************************************************************************* - * Copyright (c) 2005, 2007 IBM Corporation and others. + * Copyright (c) 2005, 2016 IBM Corporation and others. * 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 * - *******************************************************************************/ package org.eclipse.dltk.tcl.internal.console.ui.preferences; @@ -20,6 +19,7 @@ public class TclConsolePreferenceInitializer extends AbstractPreferenceInitializ public TclConsolePreferenceInitializer() { } + @Override public void initializeDefaultPreferences() { IPreferenceStore store = TclDebugUIPlugin.getDefault() .getPreferenceStore(); diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/console/ui/preferences/TclConsolePreferencePage.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/console/ui/preferences/TclConsolePreferencePage.java index d04e5ddf..493a9d7f 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/console/ui/preferences/TclConsolePreferencePage.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/console/ui/preferences/TclConsolePreferencePage.java @@ -1,11 +1,10 @@ /******************************************************************************* - * Copyright (c) 2005, 2007 IBM Corporation and others. + * Copyright (c) 2005, 2016 IBM Corporation and others. * 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 * - *******************************************************************************/ package org.eclipse.dltk.tcl.internal.console.ui.preferences; @@ -34,6 +33,7 @@ public class TclConsolePreferencePage extends PreferencePage implements private Text appendPrompt; + @Override protected IPreferenceStore doGetPreferenceStore() { return TclDebugUIPlugin.getDefault().getPreferenceStore(); } @@ -79,6 +79,7 @@ public class TclConsolePreferencePage extends PreferencePage implements false)); } + @Override protected Control createContents(Composite parent) { Composite top = new Composite(parent, SWT.NONE); @@ -121,11 +122,13 @@ public class TclConsolePreferencePage extends PreferencePage implements } + @Override protected void performDefaults() { newPrompt.setText("=>"); appendPrompt.setText("->"); } + @Override public boolean performOk() { IPreferenceStore store = getPreferenceStore(); diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclAddWatchpointDialog.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclAddWatchpointDialog.java index 7afbf49e..6c34b013 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclAddWatchpointDialog.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclAddWatchpointDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 xored software, Inc. + * Copyright (c) 2008, 2016 xored software, Inc. and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -35,6 +35,7 @@ public class TclAddWatchpointDialog extends StatusDialog { private String expression = Util.EMPTY_STRING; private Text expressionField; + @Override protected Control createDialogArea(Composite parent) { Composite composite = (Composite) super.createDialogArea(parent); Composite inner = SWTFactory.createComposite(composite, composite @@ -47,6 +48,7 @@ public class TclAddWatchpointDialog extends StatusDialog { return composite; } + @Override protected void okPressed() { final String s = expressionField.getText().trim(); if (s.length() == 0) { diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclDebugModelPresentation.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclDebugModelPresentation.java index 21412cf9..bba88b12 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclDebugModelPresentation.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclDebugModelPresentation.java @@ -1,11 +1,10 @@ /******************************************************************************* - * Copyright (c) 2005, 2007 IBM Corporation and others. + * Copyright (c) 2005, 2016 IBM Corporation and others. * 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 * - *******************************************************************************/ package org.eclipse.dltk.tcl.internal.debug.ui; @@ -15,6 +14,7 @@ import org.eclipse.ui.IEditorInput; public class TclDebugModelPresentation extends ScriptDebugModelPresentation { private static final String TCL_EDITOR_ID = "org.eclipse.dltk.tcl.ui.editor.TclEditor"; + @Override public String getEditorId(IEditorInput input, Object element) { return TCL_EDITOR_ID; } diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclDebugUILangaugeToolkit.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclDebugUILangaugeToolkit.java index 4ecea307..36204a0a 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclDebugUILangaugeToolkit.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclDebugUILangaugeToolkit.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2016 Jae Gangemi and others. + * 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: + * Jae Gangemi - initial API and implementation + *******************************************************************************/ package org.eclipse.dltk.tcl.internal.debug.ui; import org.eclipse.dltk.debug.ui.AbstractDebugUILanguageToolkit; @@ -6,23 +16,15 @@ import org.eclipse.jface.preference.IPreferenceStore; public class TclDebugUILangaugeToolkit extends AbstractDebugUILanguageToolkit { - /* - * @see org.eclipse.dltk.debug.ui.IDLTKDebugUILanguageToolkit#getDebugModelId() - */ public String getDebugModelId() { return TclDebugConstants.DEBUG_MODEL_ID; } - /* - * @see org.eclipse.dltk.debug.ui.IDLTKDebugUILanguageToolkit#getPreferenceStore() - */ public IPreferenceStore getPreferenceStore() { return TclDebugUIPlugin.getDefault().getPreferenceStore(); } - /* - * @see org.eclipse.dltk.debug.ui.AbstractDebugUILanguageToolkit#getVariablesViewPreferencePages() - */ + @Override public String[] getVariablesViewPreferencePages() { return new String[] { "org.eclipse.dltk.tcl.preferences.debug.detailFormatters" }; } diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclDebugUIPlugin.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclDebugUIPlugin.java index a7c3bcba..61f9cd40 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclDebugUIPlugin.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclDebugUIPlugin.java @@ -1,11 +1,10 @@ /******************************************************************************* - * Copyright (c) 2005, 2007 IBM Corporation and others. + * Copyright (c) 2005, 2016 IBM Corporation and others. * 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 * - *******************************************************************************/ package org.eclipse.dltk.tcl.internal.debug.ui; @@ -29,6 +28,7 @@ public class TclDebugUIPlugin extends AbstractUIPlugin { /** * This method is called upon plug-in activation */ + @Override public void start(BundleContext context) throws Exception { super.start(context); } @@ -36,6 +36,7 @@ public class TclDebugUIPlugin extends AbstractUIPlugin { /** * This method is called when the plug-in is stopped */ + @Override public void stop(BundleContext context) throws Exception { super.stop(context); plugin = null; diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclDebugUIPreferenceInitializer.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclDebugUIPreferenceInitializer.java index 30028f01..66ebcb3d 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclDebugUIPreferenceInitializer.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclDebugUIPreferenceInitializer.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2016 Jae Gangemi and others. + * 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: + * Jae Gangemi - initial API and implementation + *******************************************************************************/ package org.eclipse.dltk.tcl.internal.debug.ui; import org.eclipse.dltk.debug.ui.DLTKDebugUIPluginPreferenceInitializer; @@ -6,6 +16,7 @@ import org.eclipse.dltk.tcl.core.TclNature; public class TclDebugUIPreferenceInitializer extends DLTKDebugUIPluginPreferenceInitializer { + @Override protected String getNatureId() { return TclNature.NATURE_ID; } diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclEditorDebugAdapterFactory.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclEditorDebugAdapterFactory.java index 1587af4f..fe37e090 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclEditorDebugAdapterFactory.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclEditorDebugAdapterFactory.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2016 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + *******************************************************************************/ package org.eclipse.dltk.tcl.internal.debug.ui; import org.eclipse.debug.ui.actions.IRunToLineTarget; @@ -12,22 +22,23 @@ import org.eclipse.dltk.tcl.internal.debug.ui.actions.IToggleSpawnpointsTarget; public class TclEditorDebugAdapterFactory extends ScriptEditorDebugAdapterFactory { - public Class[] getAdapterList() { - return new Class[] { IRunToLineTarget.class, + @Override + public Class<?>[] getAdapterList() { + return new Class<?>[] { IRunToLineTarget.class, IToggleBreakpointsTarget.class, IToggleSpawnpointsTarget.class }; } - public Object getAdapter(Object adaptableObject, Class adapterType) { + @SuppressWarnings("unchecked") + @Override + public <T> T getAdapter(Object adaptableObject, Class<T> adapterType) { if (adapterType == IToggleSpawnpointsTarget.class) { - return getBreakpointAdapter(); + return (T) getBreakpointAdapter(); } else { return super.getAdapter(adaptableObject, adapterType); } } - /* - * @see getBreakointAdapter() - */ + @Override protected ScriptToggleBreakpointAdapter getBreakpointAdapter() { return new TclToggleBreakpointAdapter(); } diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclToggleBreakpointAdapter.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclToggleBreakpointAdapter.java index 5e2a5f44..fb4a0fad 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclToggleBreakpointAdapter.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclToggleBreakpointAdapter.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2016 xored software, Inc. and others. + * 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: + * xored software, Inc. - initial API and implementation + *******************************************************************************/ package org.eclipse.dltk.tcl.internal.debug.ui; import java.util.Collections; @@ -51,6 +61,7 @@ public class TclToggleBreakpointAdapter extends ScriptToggleBreakpointAdapter return TclDebugConstants.DEBUG_MODEL_ID; } + @Override protected IScriptBreakpointLineValidator getValidator() { return validator; } @@ -195,6 +206,7 @@ public class TclToggleBreakpointAdapter extends ScriptToggleBreakpointAdapter public void toggleSpawnpoints(final IWorkbenchPart part, final ITextSelection selection) throws CoreException { Job job = new Job("Script Toggle Spawnpoint") { //$NON-NLS-1$ + @Override protected IStatus run(IProgressMonitor monitor) { final ITextEditor editor = getTextEditor(part); if (editor != null) { diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclWatchExpressionDelegate.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclWatchExpressionDelegate.java index dca97fed..0a2567ba 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclWatchExpressionDelegate.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/TclWatchExpressionDelegate.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2016 xored software, Inc. and others. + * 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: + * xored software, Inc. - initial API and implementation + *******************************************************************************/ package org.eclipse.dltk.tcl.internal.debug.ui; import org.eclipse.debug.core.DebugException; @@ -13,6 +23,7 @@ import org.eclipse.dltk.internal.debug.core.model.ScriptWatchExpressionDelegate; public class TclWatchExpressionDelegate extends ScriptWatchExpressionDelegate { + @Override protected String prepareExpression(String expression) { if (expression.startsWith("$")) { //$NON-NLS-1$ return "expr { " + expression + " }"; //$NON-NLS-1$ //$NON-NLS-2$ @@ -30,10 +41,12 @@ public class TclWatchExpressionDelegate extends ScriptWatchExpressionDelegate { this.expression = expression; } + @Override public String getEvalName() { return expression; } + @Override public IScriptEvaluationCommand createEvaluationCommand( String messageTemplate, IScriptThread thread) { return null; @@ -98,6 +111,7 @@ public class TclWatchExpressionDelegate extends ScriptWatchExpressionDelegate { this.expression = expression; } + @Override public void evaluationComplete(IScriptEvaluationResult result) { if (result != null && result.getValue() != null) { listener.watchEvaluationFinished(new TclWatchExpressionResult( @@ -111,6 +125,7 @@ public class TclWatchExpressionDelegate extends ScriptWatchExpressionDelegate { } + @Override protected ListenerAdpater createListener(IWatchExpressionListener listener, String expression) { return new TclListenerAdapter(listener, expression); diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/actions/RulerToggleSpawnpointActionDelegate.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/actions/RulerToggleSpawnpointActionDelegate.java index 2e2154de..c0962075 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/actions/RulerToggleSpawnpointActionDelegate.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/actions/RulerToggleSpawnpointActionDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 xored software, Inc. + * Copyright (c) 2008, 2016 xored software, Inc. and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -80,27 +80,14 @@ public class RulerToggleSpawnpointActionDelegate extends private IEditorPart fEditor = null; private ToggleSpawnpointAction fDelegate = null; - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.texteditor.AbstractRulerActionDelegate#createAction(org - * .eclipse.ui.texteditor.ITextEditor, - * org.eclipse.jface.text.source.IVerticalRulerInfo) - */ + @Override protected IAction createAction(ITextEditor editor, IVerticalRulerInfo rulerInfo) { fDelegate = new ToggleSpawnpointAction(editor, null, rulerInfo); return fDelegate; } - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.IEditorActionDelegate#setActiveEditor(org.eclipse.jface - * .action.IAction, org.eclipse.ui.IEditorPart) - */ + @Override public void setActiveEditor(IAction callerAction, IEditorPart targetEditor) { if (fEditor != null) { if (fDelegate != null) { @@ -112,20 +99,11 @@ public class RulerToggleSpawnpointActionDelegate extends super.setActiveEditor(callerAction, targetEditor); } - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction) - */ + @Override public void init(IAction action) { } - /* - * (non-Javadoc) - * - * @see org.eclipse.ui.IActionDelegate2#dispose() - */ + @Override public void dispose() { if (fDelegate != null) { fDelegate.dispose(); @@ -134,13 +112,7 @@ public class RulerToggleSpawnpointActionDelegate extends fEditor = null; } - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action - * .IAction, org.eclipse.swt.widgets.Event) - */ + @Override public void runWithEvent(IAction action, Event event) { run(action); } diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/actions/ToggleSpawnpointAction.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/actions/ToggleSpawnpointAction.java index ff354660..698436b9 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/actions/ToggleSpawnpointAction.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/actions/ToggleSpawnpointAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 xored software, Inc. + * Copyright (c) 2008, 2016 xored software, Inc. and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -68,17 +68,13 @@ public class ToggleSpawnpointAction extends Action implements IUpdate { fRulerInfo = rulerInfo; } - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.action.IAction#run() - */ + @Override public void run() { IDocument document = getDocument(); if (document == null) { return; } - IToggleSpawnpointsTarget adapter = (IToggleSpawnpointsTarget) fPart + IToggleSpawnpointsTarget adapter = fPart .getAdapter(IToggleSpawnpointsTarget.class); if (adapter == null) { // attempt to force load adapter @@ -148,7 +144,7 @@ public class ToggleSpawnpointAction extends Action implements IUpdate { return provider.getDocument(editor.getEditorInput()); } - IDocument doc = (IDocument) fPart.getAdapter(IDocument.class); + IDocument doc = fPart.getAdapter(IDocument.class); if (doc != null) { return doc; } @@ -156,15 +152,10 @@ public class ToggleSpawnpointAction extends Action implements IUpdate { return null; } - /* - * (non-Javadoc) - * - * @see org.eclipse.ui.texteditor.IUpdate#update() - */ public void update() { IDocument document = getDocument(); if (document != null) { - IToggleSpawnpointsTarget adapter = (IToggleSpawnpointsTarget) fPart + IToggleSpawnpointsTarget adapter = fPart .getAdapter(IToggleSpawnpointsTarget.class); if (adapter == null) { // attempt to force load adapter diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/handlers/ToggleClassVariablesHandler.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/handlers/ToggleClassVariablesHandler.java index 69c8097b..d55ed1e2 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/handlers/ToggleClassVariablesHandler.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/handlers/ToggleClassVariablesHandler.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2016 Jae Gangemi and others. + * 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: + * Jae Gangemi - initial API and implementation + *******************************************************************************/ package org.eclipse.dltk.tcl.internal.debug.ui.handlers; import org.eclipse.dltk.debug.ui.handlers.AbstractToggleClassVariableHandler; @@ -12,16 +22,12 @@ import org.eclipse.jface.preference.IPreferenceStore; public class ToggleClassVariablesHandler extends AbstractToggleClassVariableHandler { - /* - * @see org.eclipse.dltk.debug.ui.handlers.AbstractToggleVariableHandler#getModelId() - */ + @Override protected String getModelId() { return TclDebugConstants.DEBUG_MODEL_ID; } - /* - * @see org.eclipse.dltk.debug.ui.handlers.AbstractToggleVariableHandler#getPreferenceStore() - */ + @Override protected IPreferenceStore getPreferenceStore() { return new PreferencesAdapter(TclDebugPlugin.getDefault() .getPluginPreferences()); diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/handlers/ToggleGlobalVariablesHandler.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/handlers/ToggleGlobalVariablesHandler.java index b2642808..25498981 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/handlers/ToggleGlobalVariablesHandler.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/handlers/ToggleGlobalVariablesHandler.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2016 Jae Gangemi and others. + * 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: + * Jae Gangemi - initial API and implementation + *******************************************************************************/ package org.eclipse.dltk.tcl.internal.debug.ui.handlers; import org.eclipse.dltk.debug.ui.handlers.AbstractToggleGlobalVariableHandler; @@ -9,21 +19,15 @@ import org.eclipse.jface.preference.IPreferenceStore; /** * Toggles the display of tcl global variables in the debug 'Variables' view */ -public class ToggleGlobalVariablesHandler extends - AbstractToggleGlobalVariableHandler { +public class ToggleGlobalVariablesHandler extends AbstractToggleGlobalVariableHandler { - /* - * @see org.eclipse.dltk.debug.ui.handlers.AbstractToggleVariableHandler#getModelId() - */ + @Override protected String getModelId() { return TclDebugConstants.DEBUG_MODEL_ID; } - /* - * @see org.eclipse.dltk.debug.ui.handlers.AbstractToggleVariableHandler#getPreferenceStore() - */ + @Override protected IPreferenceStore getPreferenceStore() { - return new PreferencesAdapter(TclDebugPlugin.getDefault() - .getPluginPreferences()); + return new PreferencesAdapter(TclDebugPlugin.getDefault().getPluginPreferences()); } } diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/handlers/ToggleLocalVariablesHandler.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/handlers/ToggleLocalVariablesHandler.java index c03eb089..ef3ebce1 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/handlers/ToggleLocalVariablesHandler.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/handlers/ToggleLocalVariablesHandler.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2016 Jae Gangemi and others. + * 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: + * Jae Gangemi - initial API and implementation + *******************************************************************************/ package org.eclipse.dltk.tcl.internal.debug.ui.handlers; import org.eclipse.dltk.debug.ui.handlers.AbstractToggleLocalVariableHandler; @@ -9,21 +19,15 @@ import org.eclipse.jface.preference.IPreferenceStore; /** * Toggles the display of tcl local variables in the debug 'Variables' view */ -public class ToggleLocalVariablesHandler extends - AbstractToggleLocalVariableHandler { +public class ToggleLocalVariablesHandler extends AbstractToggleLocalVariableHandler { - /* - * @see org.eclipse.dltk.debug.ui.handlers.AbstractToggleVariableHandler#getModelId() - */ + @Override protected String getModelId() { return TclDebugConstants.DEBUG_MODEL_ID; } - /* - * @see org.eclipse.dltk.debug.ui.handlers.AbstractToggleVariableHandler#getPreferenceStore() - */ + @Override protected IPreferenceStore getPreferenceStore() { - return new PreferencesAdapter(TclDebugPlugin.getDefault() - .getPluginPreferences()); + return new PreferencesAdapter(TclDebugPlugin.getDefault().getPluginPreferences()); } } diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/AddTclInterpreterDialog.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/AddTclInterpreterDialog.java index a1a5bc02..ab3486d6 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/AddTclInterpreterDialog.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/AddTclInterpreterDialog.java @@ -1,11 +1,10 @@ /******************************************************************************* - * Copyright (c) 2000, 2007 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * 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 * - *******************************************************************************/ package org.eclipse.dltk.tcl.internal.debug.ui.interpreters; @@ -82,6 +81,7 @@ public class AddTclInterpreterDialog extends AddScriptInterpreterDialog { private ExpandableBlock libraryExpandableNode; private ExpandableBlock environmentExpandableNode; + @Override protected Composite createEnvironmentVariablesBlockParent(Composite parent, int numColumns) { environmentExpandableNode = new ExpandableBlock(parent, 0); @@ -94,6 +94,7 @@ public class AddTclInterpreterDialog extends AddScriptInterpreterDialog { return environmentExpandableNode.getContent(); } + @Override protected Composite createLibraryBlockParent(Composite parent, int numColumns) { libraryExpandableNode = new ExpandableBlock(parent, 0); diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/AvailablePackagesBlock.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/AvailablePackagesBlock.java index 5e2533f4..0446f3bb 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/AvailablePackagesBlock.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/AvailablePackagesBlock.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2016 xored software, Inc. and others. + * 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: + * xored software,Inc. - initial API and implementation + *******************************************************************************/ package org.eclipse.dltk.tcl.internal.debug.ui.interpreters; import java.util.ArrayList; @@ -27,7 +37,6 @@ import org.eclipse.swt.widgets.Composite; * @since 2.0 */ public class AvailablePackagesBlock { - private static final Object[] PENDING_RESULT = new Object[0]; private TclInterpreterInfo interpreter = null; private TreeViewer viewer; private AddTclInterpreterDialog dialog; diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/TclInterpreterComboBlock.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/TclInterpreterComboBlock.java index e8a9cf1b..63777215 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/TclInterpreterComboBlock.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/TclInterpreterComboBlock.java @@ -1,11 +1,10 @@ /******************************************************************************* - * Copyright (c) 2005, 2007 IBM Corporation and others. + * Copyright (c) 2005, 2016 IBM Corporation and others. * 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 * - *******************************************************************************/ package org.eclipse.dltk.tcl.internal.debug.ui.interpreters; @@ -379,8 +378,7 @@ public class TclInterpreterComboBlock extends AbstractInterpreterComboBlock { if (!selection.isEmpty()) { if (selection instanceof IStructuredSelection) { final IStructuredSelection ss = (IStructuredSelection) selection; - for (@SuppressWarnings("unchecked") - Iterator iterator = ss.iterator(); iterator.hasNext();) { + for (Iterator<?> iterator = ss.iterator(); iterator.hasNext();) { final Object pkg = iterator.next(); if (pkg instanceof Package) { if (((Package) pkg).parent.readOnly) { diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/TclInterpreterEnvironmentVariablesBlock.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/TclInterpreterEnvironmentVariablesBlock.java index a446cc5c..7f7532bd 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/TclInterpreterEnvironmentVariablesBlock.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/TclInterpreterEnvironmentVariablesBlock.java @@ -1,11 +1,10 @@ /******************************************************************************* - * Copyright (c) 2000, 2007 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * 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 * - *******************************************************************************/ package org.eclipse.dltk.tcl.internal.debug.ui.interpreters; @@ -72,8 +71,7 @@ public class TclInterpreterEnvironmentVariablesBlock extends private boolean isSafe(EnvironmentVariable env) { final IEnvironment environment = getEnvironment(); if (environment != null) { - final IExecutionEnvironment execEnvironment = (IExecutionEnvironment) environment - .getAdapter(IExecutionEnvironment.class); + final IExecutionEnvironment execEnvironment = environment.getAdapter(IExecutionEnvironment.class); if (execEnvironment != null) { return execEnvironment.isSafeEnvironmentVariable(env .getName()); diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/TclInterpreterLibraryBlock.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/TclInterpreterLibraryBlock.java index 0c77157b..5177a0d9 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/TclInterpreterLibraryBlock.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/TclInterpreterLibraryBlock.java @@ -1,11 +1,10 @@ /******************************************************************************* - * Copyright (c) 2000, 2007 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * 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 * - *******************************************************************************/ package org.eclipse.dltk.tcl.internal.debug.ui.interpreters; @@ -24,11 +23,13 @@ public class TclInterpreterLibraryBlock extends AbstractInterpreterLibraryBlock super(d); } + @Override protected IBaseLabelProvider getLabelProvider() { return new LibraryLabelProvider(); // return new TclLibraryLabelProvider(); } + @Override protected LibraryContentProvider createLibraryContentProvider() { return new LibraryContentProvider(); // return new TclLibraryContentProvider(); @@ -38,10 +39,12 @@ public class TclInterpreterLibraryBlock extends AbstractInterpreterLibraryBlock // return new TreeViewer(comp); // } + @Override protected boolean isEnableButtonSupported() { return false; } + @Override protected boolean isDefaultLocations() { return false; } diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/TclInterpreterPreferencePage.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/TclInterpreterPreferencePage.java index 37a1ee1f..95f0a9a4 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/TclInterpreterPreferencePage.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/TclInterpreterPreferencePage.java @@ -1,11 +1,10 @@ /******************************************************************************* - * Copyright (c) 2005, 2007 IBM Corporation and others. + * Copyright (c) 2005, 2016 IBM Corporation and others. * 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 * - *******************************************************************************/ package org.eclipse.dltk.tcl.internal.debug.ui.interpreters; @@ -16,6 +15,7 @@ public class TclInterpreterPreferencePage extends ScriptInterpreterPreferencePag public static final String PAGE_ID = "org.eclipse.dltk.tcl.preferences.interpreters"; + @Override public InterpretersBlock createInterpretersBlock() { return new TclInterpretersBlock(); } diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/TclInterpretersBlock.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/TclInterpretersBlock.java index e5ed3195..dbca6d19 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/TclInterpretersBlock.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/TclInterpretersBlock.java @@ -1,11 +1,10 @@ /******************************************************************************* - * Copyright (c) 2005, 2007 IBM Corporation and others. + * Copyright (c) 2005, 2016 IBM Corporation and others. * 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 * - *******************************************************************************/ package org.eclipse.dltk.tcl.internal.debug.ui.interpreters; @@ -42,6 +41,7 @@ import org.eclipse.swt.widgets.Composite; public class TclInterpretersBlock extends InterpretersBlock { private Button fetchInterpreterInformation; + @Override protected AddScriptInterpreterDialog createInterpreterDialog( IInterpreterInstall standin) { AddTclInterpreterDialog dialog = new AddTclInterpreterDialog(this, @@ -51,6 +51,7 @@ public class TclInterpretersBlock extends InterpretersBlock { return dialog; } + @Override protected String getCurrentNature() { return TclNature.NATURE_ID; } @@ -128,7 +129,7 @@ public class TclInterpretersBlock extends InterpretersBlock { } smon0.subTask("Processing packages info (" + (lsize - s) + " left)"); - Set<String> pkgs = new HashSet(); + Set<String> pkgs = new HashSet<String>(); for (int i = s; i < s + part; i++) { pkgs.add(list.get(i).getName()); } diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/TclPackagesContainerPage.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/TclPackagesContainerPage.java index 6da17406..29bf01f3 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/TclPackagesContainerPage.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/interpreters/TclPackagesContainerPage.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2016 xored software, Inc. and others. + * 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: + * xored software, Inc. - initial API and implementation + *******************************************************************************/ package org.eclipse.dltk.tcl.internal.debug.ui.interpreters; import java.util.HashSet; @@ -46,10 +56,12 @@ public class TclPackagesContainerPage extends NewElementWizardPage implements IBuildpathContainerPage, IBuildpathContainerPageExtension { public class PackagesLabelProvider extends LabelProvider { + @Override public Image getImage(Object element) { return DLTKPluginImages.get(DLTKPluginImages.IMG_OBJS_PACKAGE); } + @Override public String getText(Object element) { if (element instanceof String) { return (String) element; @@ -59,8 +71,8 @@ public class TclPackagesContainerPage extends NewElementWizardPage implements } - private Set packages = new HashSet(); - private Set autoPackages = new HashSet(); + private Set<String> packages = new HashSet<String>(); + private Set<String> autoPackages = new HashSet<String>(); private class PackagesContentProvider implements ITreeContentProvider { @@ -148,6 +160,7 @@ public class TclPackagesContainerPage extends NewElementWizardPage implements add.setLayoutData(data2); add.setText("Add"); add.addSelectionListener(new SelectionAdapter() { + @Override public void widgetSelected(SelectionEvent e) { addPackage(); } @@ -157,12 +170,14 @@ public class TclPackagesContainerPage extends NewElementWizardPage implements addall.setLayoutData(data2); addall.setText("Add all"); addall.addSelectionListener(new SelectionAdapter() { + @Override public void widgetSelected(SelectionEvent e) { addAllPackages(); } }); final Button remove = new Button(buttons, SWT.PUSH); remove.addSelectionListener(new SelectionAdapter() { + @Override public void widgetSelected(SelectionEvent e) { removePackage(); } @@ -293,8 +308,8 @@ public class TclPackagesContainerPage extends NewElementWizardPage implements public void initialize(IScriptProject project, IBuildpathEntry[] currentEntries) { this.scriptProject = project; - Set set = new HashSet(); - Set autoSet = new HashSet(); + Set<String> set = new HashSet<String>(); + Set<String> autoSet = new HashSet<String>(); InterpreterContainerHelper.getInterpreterContainerDependencies(project, set, autoSet); this.packages.addAll(set); diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/launchConfigurations/TclRemoteLaunchConfigurationTab.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/launchConfigurations/TclRemoteLaunchConfigurationTab.java index e661a59c..ca2339e8 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/launchConfigurations/TclRemoteLaunchConfigurationTab.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/launchConfigurations/TclRemoteLaunchConfigurationTab.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2016 xored software, Inc. and others. + * 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: + * xored software, Inc. - initial API and implementation + *******************************************************************************/ package org.eclipse.dltk.tcl.internal.debug.ui.launchConfigurations; import org.eclipse.dltk.core.PreferencesLookupDelegate; @@ -16,26 +26,20 @@ public class TclRemoteLaunchConfigurationTab extends super(mode); } - /* - * @see org.eclipse.dltk.debug.ui.launchConfigurations.ScriptLaunchConfigurationTab#breakOnFirstLinePrefEnabled(org.eclipse.dltk.core.PreferencesLookupDelegate) - */ + @Override protected boolean breakOnFirstLinePrefEnabled( PreferencesLookupDelegate delegate) { return delegate.getBoolean(TclDebugPlugin.PLUGIN_ID, DLTKDebugPreferenceConstants.PREF_DBGP_BREAK_ON_FIRST_LINE); } - /* - * @see org.eclipse.dltk.debug.ui.launchConfigurations.ScriptLaunchConfigurationTab#dbpgLoggingPrefEnabled(org.eclipse.dltk.core.PreferencesLookupDelegate) - */ + @Override protected boolean dbpgLoggingPrefEnabled(PreferencesLookupDelegate delegate) { return delegate.getBoolean(TclDebugPlugin.PLUGIN_ID, DLTKDebugPreferenceConstants.PREF_DBGP_ENABLE_LOGGING); } - /* - * @see org.eclipse.dltk.debug.ui.launchConfigurations.ScriptLaunchConfigurationTab#getNatureID() - */ + @Override protected String getNatureID() { return TclNature.NATURE_ID; } diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/launchConfigurations/TclScriptArgumentsTab.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/launchConfigurations/TclScriptArgumentsTab.java index 06cdbcef..88d5705c 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/launchConfigurations/TclScriptArgumentsTab.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/launchConfigurations/TclScriptArgumentsTab.java @@ -1,11 +1,10 @@ /******************************************************************************* - * Copyright (c) 2005, 2007 IBM Corporation and others. + * Copyright (c) 2005, 2016 IBM Corporation and others. * 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 * - *******************************************************************************/ package org.eclipse.dltk.tcl.internal.debug.ui.launchConfigurations; @@ -14,6 +13,7 @@ import org.eclipse.dltk.internal.debug.ui.launcher.InterpreterArgumentsBlock; public class TclScriptArgumentsTab extends ScriptArgumentsTab { + @Override protected InterpreterArgumentsBlock createInterpreterArgsBlock() { return null; } diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/launcher/TclLaunchShortcut.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/launcher/TclLaunchShortcut.java index 35ec9673..2e4eaaec 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/launcher/TclLaunchShortcut.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/launcher/TclLaunchShortcut.java @@ -1,11 +1,10 @@ /******************************************************************************* - * Copyright (c) 2005, 2007 IBM Corporation and others. + * Copyright (c) 2005, 2016 IBM Corporation and others. * 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 * - *******************************************************************************/ package org.eclipse.dltk.tcl.internal.debug.ui.launcher; @@ -15,11 +14,12 @@ import org.eclipse.dltk.tcl.core.TclNature; import org.eclipse.dltk.tcl.launching.TclLaunchConfigurationConstants; public class TclLaunchShortcut extends AbstractScriptLaunchShortcut { + @Override protected ILaunchConfigurationType getConfigurationType() { - return getLaunchManager().getLaunchConfigurationType( - TclLaunchConfigurationConstants.ID_TCL_SCRIPT); + return getLaunchManager().getLaunchConfigurationType(TclLaunchConfigurationConstants.ID_TCL_SCRIPT); } + @Override protected String getNatureId() { return TclNature.NATURE_ID; } diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/preferences/TclDebugPreferencePage.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/preferences/TclDebugPreferencePage.java index cdfadd4e..16185a3c 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/preferences/TclDebugPreferencePage.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/preferences/TclDebugPreferencePage.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2016 xored software, Inc. and others. + * 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: + * xored software, Inc. - initial API and implementation + *******************************************************************************/ package org.eclipse.dltk.tcl.internal.debug.ui.preferences; import org.eclipse.core.resources.IProject; @@ -19,39 +29,31 @@ import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer; /** * Tcl debug preference page */ -public class TclDebugPreferencePage extends - AbstractConfigurationBlockPropertyAndPreferencePage { +public class TclDebugPreferencePage extends AbstractConfigurationBlockPropertyAndPreferencePage { - private static final PreferenceKey BREAK_ON_FIRST_LINE = new PreferenceKey( - TclDebugPlugin.PLUGIN_ID, + private static final PreferenceKey BREAK_ON_FIRST_LINE = new PreferenceKey(TclDebugPlugin.PLUGIN_ID, DLTKDebugPreferenceConstants.PREF_DBGP_BREAK_ON_FIRST_LINE); - private static final PreferenceKey ENABLE_DBGP_LOGGING = new PreferenceKey( - TclDebugPlugin.PLUGIN_ID, + private static final PreferenceKey ENABLE_DBGP_LOGGING = new PreferenceKey(TclDebugPlugin.PLUGIN_ID, DLTKDebugPreferenceConstants.PREF_DBGP_ENABLE_LOGGING); private static final PreferenceKey STREAM_FILTER_COMMAND_RENAME_WARNING = new PreferenceKey( - TclDebugPlugin.PLUGIN_ID, - TclDebugConstants.DEBUG_STREAM_FILTER_COMMAND_RENAME_WARNING); + TclDebugPlugin.PLUGIN_ID, TclDebugConstants.DEBUG_STREAM_FILTER_COMMAND_RENAME_WARNING); private static final String PREFERENCE_PAGE_ID = "org.eclipse.dltk.tcl.preferences.debug"; //$NON-NLS-1$ private static final String PROPERTY_PAGE_ID = "org.eclipse.dltk.tcl.propertyPage.debug"; //$NON-NLS-1$ - /* - * @see AbstractConfigurationBlockPropertyAndPreferencePage - * #createOptionsBlock(IStatusChangeListener, IProject, - * IWorkbenchPreferenceContainer) - */ - protected AbstractOptionsBlock createOptionsBlock( - IStatusChangeListener newStatusChangedListener, IProject project, + @Override + protected AbstractOptionsBlock createOptionsBlock(IStatusChangeListener newStatusChangedListener, IProject project, IWorkbenchPreferenceContainer container) { - return new AbstractDebuggingOptionsBlock(newStatusChangedListener, - project, getKeys(), container) { + return new AbstractDebuggingOptionsBlock(newStatusChangedListener, project, getKeys(), container) { + @Override protected PreferenceKey getBreakOnFirstLineKey() { return BREAK_ON_FIRST_LINE; } + @Override protected PreferenceKey getDbgpLoggingEnabledKey() { return ENABLE_DBGP_LOGGING; } @@ -62,68 +64,49 @@ public class TclDebugPreferencePage extends @Override protected void createSettingsGroup(Group group) { super.createSettingsGroup(group); - final Button ignoreRename = SWTFactory - .createCheckButton( - group, - TclDebugPreferencesMessages.TclDebugPreferencePage_StreamFilterCommandRename, - null, false, 1); - bindControl(ignoreRename, STREAM_FILTER_COMMAND_RENAME_WARNING, - null); + final Button ignoreRename = SWTFactory.createCheckButton(group, + TclDebugPreferencesMessages.TclDebugPreferencePage_StreamFilterCommandRename, null, false, 1); + bindControl(ignoreRename, STREAM_FILTER_COMMAND_RENAME_WARNING, null); } }; } + @Override protected String getNatureId() { return TclNature.NATURE_ID; } protected PreferenceKey[] getKeys() { - return new PreferenceKey[] { BREAK_ON_FIRST_LINE, ENABLE_DBGP_LOGGING, - STREAM_FILTER_COMMAND_RENAME_WARNING }; + return new PreferenceKey[] { BREAK_ON_FIRST_LINE, ENABLE_DBGP_LOGGING, STREAM_FILTER_COMMAND_RENAME_WARNING }; } - /* - * @see AbstractConfigurationBlockPropertyAndPreferencePage#getHelpId() - */ + @Override protected String getHelpId() { return null; } - /* - * @see PropertyAndPreferencePage#getPreferencePageId() - */ + @Override protected String getPreferencePageId() { return PREFERENCE_PAGE_ID; } - /* - * @see - * AbstractConfigurationBlockPropertyAndPreferencePage#getProjectHelpId() - */ + @Override protected String getProjectHelpId() { return null; } - /* - * @see PropertyAndPreferencePage#getPropertyPageId() - */ + @Override protected String getPropertyPageId() { return PROPERTY_PAGE_ID; } - /* - * @see AbstractConfigurationBlockPropertyAndPreferencePage#setDescription() - */ + @Override protected void setDescription() { setDescription(TclDebugPreferencesMessages.TclDebugPreferencePage_description); } - /* - * @see - * AbstractConfigurationBlockPropertyAndPreferencePage#setPreferenceStore() - */ + @Override protected void setPreferenceStore() { - setPreferenceStore(new PreferencesAdapter(TclDebugPlugin.getDefault() - .getPluginPreferences())); + setPreferenceStore(new PreferencesAdapter(TclDebugPlugin.getDefault().getPluginPreferences())); } } diff --git a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/preferences/TclDebuggingEnginePreferencePage.java b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/preferences/TclDebuggingEnginePreferencePage.java index 88fd9e2c..538031e9 100644 --- a/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/preferences/TclDebuggingEnginePreferencePage.java +++ b/tcl/plugins/org.eclipse.dltk.tcl.debug.ui/src/org/eclipse/dltk/tcl/internal/debug/ui/preferences/TclDebuggingEnginePreferencePage.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2016 Jae Gangemi and others. + * 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: + * Jae Gangemi - initial API and implementation + *******************************************************************************/ package org.eclipse.dltk.tcl.internal.debug.ui.preferences; import org.eclipse.core.resources.IProject; @@ -17,83 +27,66 @@ import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer; /** * Tcl debugging engine preference page */ -public class TclDebuggingEnginePreferencePage extends - AbstractConfigurationBlockPropertyAndPreferencePage { +public class TclDebuggingEnginePreferencePage extends AbstractConfigurationBlockPropertyAndPreferencePage { - static PreferenceKey DEBUGGING_ENGINE = new PreferenceKey( - TclDebugPlugin.PLUGIN_ID, TclDebugConstants.DEBUGGING_ENGINE_ID_KEY); + static PreferenceKey DEBUGGING_ENGINE = new PreferenceKey(TclDebugPlugin.PLUGIN_ID, + TclDebugConstants.DEBUGGING_ENGINE_ID_KEY); private final String PREFERENCE_PAGE_ID = "org.eclipse.dltk.tcl.preferences.debug.engines"; //$NON-NLS-1$ private final String PROPERTY_PAGE_ID = "org.eclipse.dltk.tcl.propertyPage.debug.engines"; //$NON-NLS-1$ - /* - * @see org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPropertyAndPreferencePage#createOptionsBlock(org.eclipse.dltk.ui.util.IStatusChangeListener, - * org.eclipse.core.resources.IProject, - * org.eclipse.ui.preferences.IWorkbenchPreferenceContainer) - */ - protected AbstractOptionsBlock createOptionsBlock( - IStatusChangeListener newStatusChangedListener, IProject project, + @Override + protected AbstractOptionsBlock createOptionsBlock(IStatusChangeListener newStatusChangedListener, IProject project, IWorkbenchPreferenceContainer container) { - return new AbstractDebuggingEngineOptionsBlock( - newStatusChangedListener, project, getKeys(), container) { + return new AbstractDebuggingEngineOptionsBlock(newStatusChangedListener, project, getKeys(), container) { + @Override protected String getNatureId() { return TclNature.NATURE_ID; } + @Override protected PreferenceKey getSavedContributionKey() { return DEBUGGING_ENGINE; } }; } - /* - * @see org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPropertyAndPreferencePage#getHelpId() - */ + @Override protected String getHelpId() { // TODO Auto-generated method stub return null; } - + + @Override protected String getNatureId() { return TclNature.NATURE_ID; } - /* - * @see org.eclipse.dltk.internal.ui.preferences.PropertyAndPreferencePage#getPreferencePageId() - */ + @Override protected String getPreferencePageId() { return PREFERENCE_PAGE_ID; } - /* - * @see org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPropertyAndPreferencePage#getProjectHelpId() - */ + @Override protected String getProjectHelpId() { // TODO Auto-generated method stub return null; } - /* - * @see org.eclipse.dltk.internal.ui.preferences.PropertyAndPreferencePage#getPropertyPageId() - */ + @Override protected String getPropertyPageId() { return PROPERTY_PAGE_ID; } - /* - * @see org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPropertyAndPreferencePage#setDescription() - */ + @Override protected void setDescription() { setDescription(TclDebugPreferencesMessages.TclDebugEnginePreferencePage_description); } - /* - * @see org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPropertyAndPreferencePage#setPreferenceStore() - */ + @Override protected void setPreferenceStore() { - setPreferenceStore(new PreferencesAdapter(TclDebugPlugin.getDefault() - .getPluginPreferences())); + setPreferenceStore(new PreferencesAdapter(TclDebugPlugin.getDefault().getPluginPreferences())); } private PreferenceKey[] getKeys() { |