diff options
Diffstat (limited to 'org.eclipse.debug.examples.ui/src')
33 files changed, 178 insertions, 166 deletions
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlLabelProvider.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlLabelProvider.java index f54234bf8..febdf3e42 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlLabelProvider.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlLabelProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 IBM Corporation and others. + * Copyright (c) 2008, 2013 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 @@ -34,7 +34,7 @@ public class ControlLabelProvider extends ElementLabelProvider { if (SequencerColumnPresentation.COL_VALUE.equals(columnId)) { return control.getValue(); } - return ""; + return ""; //$NON-NLS-1$ } } diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlsMementoProvider.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlsMementoProvider.java index 6df637fc8..1e3988ad1 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlsMementoProvider.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlsMementoProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 IBM Corporation and others. + * Copyright (c) 2008, 2013 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 @@ -28,10 +28,10 @@ public class ControlsMementoProvider extends DebugElementMementoProvider { */ protected String getElementName(Object element, IPresentationContext context) throws CoreException { if (element instanceof MidiLaunch) { - return "SEQUENCER"; + return "SEQUENCER"; //$NON-NLS-1$ } if (element instanceof TempoControl) { - return "TEMPO_CONTROL"; + return "TEMPO_CONTROL"; //$NON-NLS-1$ } return null; } diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventLabelProvider.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventLabelProvider.java index 6ea60ef96..13406acda 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventLabelProvider.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventLabelProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2009 IBM Corporation and others. + * Copyright (c) 2008, 2013 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 @@ -55,7 +55,7 @@ public class MidiEventLabelProvider extends ElementLabelProvider { return Integer.toString(((ShortMessage)message).getChannel()); } } - return ""; + return ""; //$NON-NLS-1$ } diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventModelProxy.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventModelProxy.java index b535c3d2d..884062f09 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventModelProxy.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventModelProxy.java @@ -1,5 +1,5 @@ /***************************************************************** - * Copyright (c) 2009 Texas Instruments and others + * Copyright (c) 2009, 2013 Texas Instruments 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 @@ -7,6 +7,7 @@ * * Contributors: * Patrick Chuong (Texas Instruments) - Initial API and implementation (Bug 286310) + * IBM Corporation - bug fixing *****************************************************************/ package org.eclipse.debug.examples.ui.midi.adapters; @@ -26,7 +27,7 @@ public class MidiEventModelProxy extends AbstractModelProxy implements ICheckbox * @see org.eclipse.debug.internal.ui.viewers.model.provisional.ICheckboxModelProxy#setChecked(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.Object, org.eclipse.jface.viewers.TreePath, boolean) */ public boolean setChecked(IPresentationContext context, Object viewerInput, TreePath path, boolean checked) { - System.out.println("TrackCheckListener.setChecked() element = " + path.getLastSegment() + " checked = " + checked); + System.out.println("TrackCheckListener.setChecked() element = " + path.getLastSegment() + " checked = " + checked); //$NON-NLS-1$ //$NON-NLS-2$ gChecked.put(path, Boolean.valueOf(checked)); return true; } diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiStepOverHandler.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiStepOverHandler.java index fb2bdaafa..440b79e46 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiStepOverHandler.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiStepOverHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 IBM Corporation and others. + * Copyright (c) 2008, 2013 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 @@ -38,7 +38,7 @@ public class MidiStepOverHandler implements IStepOverHandler { public boolean execute(IDebugCommandRequest request) { // We could create a job to do this work, schedule it, then return to be asynchronous // If running asynchronously, remember to return the enablement you want the action to have while this action is run - request.setStatus(new Status(IStatus.WARNING,"org.eclipse.debug.examples.ui","This is an example command handler overriding the default using an adapter on " + request.getElements()[0].getClass().getName())); + request.setStatus(new Status(IStatus.WARNING, "org.eclipse.debug.examples.ui", "This is an example command handler overriding the default using an adapter on " + request.getElements()[0].getClass().getName())); //$NON-NLS-1$ //$NON-NLS-2$ request.done(); return true; } diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerColumnPresentation.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerColumnPresentation.java index 4542f844e..5be898b41 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerColumnPresentation.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerColumnPresentation.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 IBM Corporation and others. + * Copyright (c) 2008, 2013 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 @@ -22,8 +22,8 @@ public class SequencerColumnPresentation extends AbstractColumnPresentation { /** * Column identifiers */ - public static final String COL_NAME = "NAME"; - public static final String COL_VALUE = "VALUE"; + public static final String COL_NAME = "NAME"; //$NON-NLS-1$ + public static final String COL_VALUE = "VALUE"; //$NON-NLS-1$ /** * All columns @@ -33,7 +33,7 @@ public class SequencerColumnPresentation extends AbstractColumnPresentation { /** * Column presentation ID. */ - public static final String ID = "org.eclipse.debug.examples.ui.midi.columnPresentation"; + public static final String ID = "org.eclipse.debug.examples.ui.midi.columnPresentation"; //$NON-NLS-1$ /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation#getAvailableColumns() @@ -47,12 +47,12 @@ public class SequencerColumnPresentation extends AbstractColumnPresentation { */ public String getHeader(String id) { if (COL_NAME.equals(id)) { - return "Control"; + return "Control"; //$NON-NLS-1$ } if (COL_VALUE.equals(id)) { - return "Value"; + return "Value"; //$NON-NLS-1$ } - return ""; + return ""; //$NON-NLS-1$ } /* (non-Javadoc) diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackColumnPresentation.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackColumnPresentation.java index 05713db26..a24ce8c19 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackColumnPresentation.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackColumnPresentation.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 IBM Corporation and others. + * Copyright (c) 2008, 2013 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 @@ -22,10 +22,10 @@ public class TrackColumnPresentation extends AbstractColumnPresentation { /** * Column identifiers */ - public static final String COL_TICK = "TICK"; - public static final String COL_BYTES = "BYTES"; - public static final String COL_COMMAND = "COMMAND"; - public static final String COL_CHANNEL = "CHANNEL"; + public static final String COL_TICK = "TICK"; //$NON-NLS-1$ + public static final String COL_BYTES = "BYTES"; //$NON-NLS-1$ + public static final String COL_COMMAND = "COMMAND"; //$NON-NLS-1$ + public static final String COL_CHANNEL = "CHANNEL"; //$NON-NLS-1$ /** * All columns @@ -40,7 +40,7 @@ public class TrackColumnPresentation extends AbstractColumnPresentation { /** * Column presentation ID. */ - public static final String ID = "org.eclipse.debug.examples.ui.midi.trackColumns"; + public static final String ID = "org.eclipse.debug.examples.ui.midi.trackColumns"; //$NON-NLS-1$ /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation#getAvailableColumns() @@ -54,18 +54,18 @@ public class TrackColumnPresentation extends AbstractColumnPresentation { */ public String getHeader(String id) { if (COL_TICK.equals(id)) { - return "Tick"; + return "Tick"; //$NON-NLS-1$ } if (COL_BYTES.equals(id)) { - return "Bytes"; + return "Bytes"; //$NON-NLS-1$ } if (COL_CHANNEL.equals(id)) { - return "Channel"; + return "Channel"; //$NON-NLS-1$ } if (COL_COMMAND.equals(id)) { - return "Command"; + return "Command"; //$NON-NLS-1$ } - return ""; + return ""; //$NON-NLS-1$ } /* (non-Javadoc) diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackLabelProvider.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackLabelProvider.java index fa8f891fb..817ebb5be 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackLabelProvider.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackLabelProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 IBM Corporation and others. + * Copyright (c) 2008, 2013 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 @@ -39,11 +39,11 @@ public class TrackLabelProvider extends ElementLabelProvider { } } StringBuffer buf = new StringBuffer(); - buf.append("Track "); + buf.append("Track "); //$NON-NLS-1$ buf.append(i); - buf.append(" ["); + buf.append(" ["); //$NON-NLS-1$ buf.append(track.size()); - buf.append(" events]"); + buf.append(" events]"); //$NON-NLS-1$ return buf.toString(); } diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ClockSliderDetailPane.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ClockSliderDetailPane.java index 234618f4a..d80481839 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ClockSliderDetailPane.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ClockSliderDetailPane.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 IBM Corporation and others. + * Copyright (c) 2008, 2013 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 @@ -77,7 +77,7 @@ public class ClockSliderDetailPane implements IDetailPane { * @see org.eclipse.debug.ui.IDetailPane#getDescription() */ public String getDescription() { - return "Location (seconds)"; + return "Location (seconds)"; //$NON-NLS-1$ } /* (non-Javadoc) @@ -91,7 +91,7 @@ public class ClockSliderDetailPane implements IDetailPane { * @see org.eclipse.debug.ui.IDetailPane#getName() */ public String getName() { - return "Clock Slider (seconds)"; + return "Clock Slider (seconds)"; //$NON-NLS-1$ } /* (non-Javadoc) diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ControlDetailPaneFactory.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ControlDetailPaneFactory.java index 10353fd57..fda22c034 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ControlDetailPaneFactory.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ControlDetailPaneFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 IBM Corporation and others. + * Copyright (c) 2008, 2013 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 @@ -29,12 +29,12 @@ public class ControlDetailPaneFactory implements IDetailPaneFactory { /** * Identifier for the tempo slider detail pane */ - public static final String ID_TEMPO_SLIDER = "TEMPO_SLIDER"; + public static final String ID_TEMPO_SLIDER = "TEMPO_SLIDER"; //$NON-NLS-1$ /** * Identifier for the clock slider detail pane */ - public static final String ID_CLOCK_SLIDER = "CLOCK_SLIDER"; + public static final String ID_CLOCK_SLIDER = "CLOCK_SLIDER"; //$NON-NLS-1$ /* (non-Javadoc) * @see org.eclipse.debug.ui.IDetailPaneFactory#createDetailPane(java.lang.String) @@ -70,10 +70,10 @@ public class ControlDetailPaneFactory implements IDetailPaneFactory { */ public String getDetailPaneDescription(String paneID) { if (ID_TEMPO_SLIDER.equals(paneID)) { - return "Tempo Slider"; + return "Tempo Slider"; //$NON-NLS-1$ } if (ID_CLOCK_SLIDER.equals(paneID)) { - return "Clock Slider"; + return "Clock Slider"; //$NON-NLS-1$ } return null; } @@ -83,10 +83,10 @@ public class ControlDetailPaneFactory implements IDetailPaneFactory { */ public String getDetailPaneName(String paneID) { if (ID_TEMPO_SLIDER.equals(paneID)) { - return "Tempo Slider"; + return "Tempo Slider"; //$NON-NLS-1$ } if (ID_CLOCK_SLIDER.equals(paneID)) { - return "Clock Slider"; + return "Clock Slider"; //$NON-NLS-1$ } return null; } diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/TempoSliderDetailPane.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/TempoSliderDetailPane.java index d5e1c7bb7..ccce38df3 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/TempoSliderDetailPane.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/TempoSliderDetailPane.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 IBM Corporation and others. + * Copyright (c) 2008, 2013 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 @@ -74,7 +74,7 @@ public class TempoSliderDetailPane implements IDetailPane { * @see org.eclipse.debug.ui.IDetailPane#getDescription() */ public String getDescription() { - return "Tempo (beats per minute)"; + return "Tempo (beats per minute)"; //$NON-NLS-1$ } /* (non-Javadoc) @@ -88,7 +88,7 @@ public class TempoSliderDetailPane implements IDetailPane { * @see org.eclipse.debug.ui.IDetailPane#getName() */ public String getName() { - return "Tempo Slider (BPM)"; + return "Tempo Slider (BPM)"; //$NON-NLS-1$ } /* (non-Javadoc) diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/ExampleLaunchStatusHandler.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/ExampleLaunchStatusHandler.java index 16562cdd8..2af3957ef 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/ExampleLaunchStatusHandler.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/ExampleLaunchStatusHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010 IBM Corporation and others. + * Copyright (c) 2010, 2013 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 @@ -26,7 +26,7 @@ public class ExampleLaunchStatusHandler implements IStatusHandler { if (source instanceof ILaunchConfigurationDialog) { return null; } - throw new CoreException(new Status(IStatus.ERROR, "org.eclipse.debug.examples.ui", "'source' should be an instanceof ILaunchConfigrationDialog")); + throw new CoreException(new Status(IStatus.ERROR, "org.eclipse.debug.examples.ui", "'source' should be an instanceof ILaunchConfigrationDialog")); //$NON-NLS-1$ //$NON-NLS-2$ } } diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiLaunchShortcut.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiLaunchShortcut.java index 3421dd217..987b12bb4 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiLaunchShortcut.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiLaunchShortcut.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2009 IBM Corporation and others. + * Copyright (c) 2008, 2013 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 @@ -121,8 +121,8 @@ public class MidiLaunchShortcut implements ILaunchShortcut { IDebugModelPresentation labelProvider = DebugUITools.newDebugModelPresentation(); ElementListSelectionDialog dialog= new ElementListSelectionDialog(DebugUIPlugin.getActiveWorkbenchShell(), labelProvider); dialog.setElements(configList.toArray()); - dialog.setTitle("Select Configuraiton"); - dialog.setMessage("&Select an existing configuration:"); + dialog.setTitle("Select Configuraiton"); //$NON-NLS-1$ + dialog.setMessage("&Select an existing configuration:"); //$NON-NLS-1$ dialog.setMultipleSelection(false); int result = dialog.open(); labelProvider.dispose(); @@ -144,7 +144,7 @@ public class MidiLaunchShortcut implements ILaunchShortcut { try { ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(null, getLaunchManager(). generateLaunchConfigurationName( - "[" + file.getProject().getName() + "] " + file.getName())); +"[" + file.getProject().getName() + "] " + file.getName())); //$NON-NLS-1$ //$NON-NLS-2$ workingCopy.setAttribute(MidiLaunchDelegate.ATTR_MIDI_FILE, file.getFullPath().toString()); workingCopy.setMappedResources(new IResource[]{file}); return workingCopy.doSave(); diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiMainTab.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiMainTab.java index d063008b4..b7d2bd092 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiMainTab.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiMainTab.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2010 IBM Corporation and others. + * Copyright (c) 2008, 2013 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 @@ -71,7 +71,7 @@ public class MidiMainTab extends AbstractLaunchConfigurationTab { createVerticalSpacer(comp, 3); Label programLabel = new Label(comp, SWT.NONE); - programLabel.setText("&Midi File:"); + programLabel.setText("&Midi File:"); //$NON-NLS-1$ GridData gd = new GridData(GridData.BEGINNING); programLabel.setLayoutData(gd); programLabel.setFont(font); @@ -98,13 +98,13 @@ public class MidiMainTab extends AbstractLaunchConfigurationTab { gd.horizontalSpan = 3; Group test = new Group(comp, SWT.NONE); - test.setText("Exceptions"); + test.setText("Exceptions"); //$NON-NLS-1$ gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan = 3; test.setLayoutData(gd); test.setLayout(new GridLayout()); fExceptions = new Button(test, SWT.CHECK); - fExceptions.setText("&Throw an exception during launch for testing purposes"); + fExceptions.setText("&Throw an exception during launch for testing purposes"); //$NON-NLS-1$ gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan = 3; fExceptions.setLayoutData(gd); @@ -116,7 +116,7 @@ public class MidiMainTab extends AbstractLaunchConfigurationTab { } }); fHandled = new Button(test, SWT.RADIO); - fHandled.setText("Throw a handled e&xception during launch to re-open launch dialog"); + fHandled.setText("Throw a handled e&xception during launch to re-open launch dialog"); //$NON-NLS-1$ SelectionAdapter sa = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { updateLaunchConfigurationDialog(); @@ -124,7 +124,7 @@ public class MidiMainTab extends AbstractLaunchConfigurationTab { }; fHandled.addSelectionListener(sa); fUnhandled = new Button(test, SWT.RADIO); - fUnhandled.setText("Throw an &unhandled exception during launch to open error dialog"); + fUnhandled.setText("Throw an &unhandled exception during launch to open error dialog"); //$NON-NLS-1$ fUnhandled.addSelectionListener(sa); } @@ -133,8 +133,8 @@ public class MidiMainTab extends AbstractLaunchConfigurationTab { */ protected void browseMidiFiles() { ResourceListSelectionDialog dialog = new ResourceListSelectionDialog(getShell(), ResourcesPlugin.getWorkspace().getRoot(), IResource.FILE); - dialog.setTitle("MIDI File"); - dialog.setMessage("Select MIDI File"); + dialog.setTitle("MIDI File"); //$NON-NLS-1$ + dialog.setMessage("Select MIDI File"); //$NON-NLS-1$ if (dialog.open() == Window.OK) { Object[] files = dialog.getResult(); IFile file = (IFile) files[0]; @@ -206,7 +206,7 @@ public class MidiMainTab extends AbstractLaunchConfigurationTab { * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName() */ public String getName() { - return "Main"; + return "Main"; //$NON-NLS-1$ } /* (non-Javadoc) @@ -219,11 +219,11 @@ public class MidiMainTab extends AbstractLaunchConfigurationTab { if (text.length() > 0) { IPath path = new Path(text); if (ResourcesPlugin.getWorkspace().getRoot().findMember(path) == null) { - setErrorMessage("File does not exist"); + setErrorMessage("File does not exist"); //$NON-NLS-1$ return false; } } else { - setMessage("Select a MIDI file"); + setMessage("Select a MIDI file"); //$NON-NLS-1$ } return true; } diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/DebugUIPlugin.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/DebugUIPlugin.java index f46234338..523952c40 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/DebugUIPlugin.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/DebugUIPlugin.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2008 IBM Corporation and others. + * Copyright (c) 2005, 2013 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 @@ -15,9 +15,9 @@ import java.net.URL; import java.util.HashMap; import java.util.Iterator; import java.util.Map; +import java.util.Map.Entry; import java.util.MissingResourceException; import java.util.ResourceBundle; -import java.util.Map.Entry; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.resource.ImageRegistry; @@ -47,24 +47,24 @@ public class DebugUIPlugin extends AbstractUIPlugin { /** * Toolbar action to pop data stack */ - public final static String IMG_ELCL_POP = "IMG_ELCL_POP"; - public final static String IMG_DLCL_POP = "IMG_DLCL_POP"; + public final static String IMG_ELCL_POP = "IMG_ELCL_POP"; //$NON-NLS-1$ + public final static String IMG_DLCL_POP = "IMG_DLCL_POP"; //$NON-NLS-1$ /** * Toolbar action to push onto data stack */ - public final static String IMG_ELCL_PUSH = "IMG_ELCL_PUSH"; - public final static String IMG_DLCL_PUSH = "IMG_DLCL_PUSH"; + public final static String IMG_ELCL_PUSH = "IMG_ELCL_PUSH"; //$NON-NLS-1$ + public final static String IMG_DLCL_PUSH = "IMG_DLCL_PUSH"; //$NON-NLS-1$ /** * PDA program image */ - public final static String IMG_OBJ_PDA = "IMB_OBJ_PDA"; + public final static String IMG_OBJ_PDA = "IMB_OBJ_PDA"; //$NON-NLS-1$ /** * MIDI file image */ - public final static String IMG_OBJ_MIDI = "IMB_OBJ_MIDI"; + public final static String IMG_OBJ_MIDI = "IMB_OBJ_MIDI"; //$NON-NLS-1$ /** * Keyword color @@ -75,7 +75,7 @@ public class DebugUIPlugin extends AbstractUIPlugin { /** * Managed colors */ - private Map fColors = new HashMap(); + private final Map fColors = new HashMap(); /** * The constructor. @@ -136,7 +136,9 @@ public class DebugUIPlugin extends AbstractUIPlugin { public ResourceBundle getResourceBundle() { try { if (resourceBundle == null) - resourceBundle = ResourceBundle.getBundle("org.eclipse.debug.examples.ui.pda.DebugUIPluginResources"); + { + resourceBundle = ResourceBundle.getBundle("org.eclipse.debug.examples.ui.pda.DebugUIPluginResources"); //$NON-NLS-1$ + } } catch (MissingResourceException x) { resourceBundle = null; } @@ -148,12 +150,12 @@ public class DebugUIPlugin extends AbstractUIPlugin { * @see org.eclipse.ui.plugin.AbstractUIPlugin#initializeImageRegistry(org.eclipse.jface.resource.ImageRegistry) */ protected void initializeImageRegistry(ImageRegistry reg) { - declareImage(IMG_OBJ_PDA, PATH_OBJECT + "pda.gif"); - declareImage(IMG_OBJ_MIDI, PATH_OBJECT + "note.gif"); - declareImage(IMG_ELCL_POP, PATH_ELOCALTOOL + "pop.gif"); - declareImage(IMG_DLCL_POP, PATH_DLOCALTOOL + "pop.gif"); - declareImage(IMG_ELCL_PUSH, PATH_ELOCALTOOL + "push.gif"); - declareImage(IMG_DLCL_PUSH, PATH_DLOCALTOOL + "push.gif"); + declareImage(IMG_OBJ_PDA, PATH_OBJECT + "pda.gif"); //$NON-NLS-1$ + declareImage(IMG_OBJ_MIDI, PATH_OBJECT + "note.gif"); //$NON-NLS-1$ + declareImage(IMG_ELCL_POP, PATH_ELOCALTOOL + "pop.gif"); //$NON-NLS-1$ + declareImage(IMG_DLCL_POP, PATH_DLOCALTOOL + "pop.gif"); //$NON-NLS-1$ + declareImage(IMG_ELCL_PUSH, PATH_ELOCALTOOL + "push.gif"); //$NON-NLS-1$ + declareImage(IMG_DLCL_PUSH, PATH_DLOCALTOOL + "push.gif"); //$NON-NLS-1$ } /** @@ -167,7 +169,7 @@ public class DebugUIPlugin extends AbstractUIPlugin { * <code>false</code> if this is not a shared image */ private void declareImage(String key, String path) { - URL url = BundleUtility.find("org.eclipse.debug.examples.ui", path); + URL url = BundleUtility.find("org.eclipse.debug.examples.ui", path); //$NON-NLS-1$ ImageDescriptor desc = ImageDescriptor.createFromURL(url); getImageRegistry().put(key, desc); } diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDAThreadEventHandler.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDAThreadEventHandler.java index ab77bd09d..60d0bbc6c 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDAThreadEventHandler.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDAThreadEventHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2011 IBM Corporation and others. + * Copyright (c) 2005, 2013 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 @@ -108,6 +108,10 @@ public class PDAThreadEventHandler extends DebugEventHandler { return newdelta.addNode(debugTarget, indexOf(children, debugTarget), IModelDelta.NO_CHANGE, numFrames); } + /** + * @param thread + * @param flags + */ private void fireDeltaAndClearTopFrame(IThread thread, int flags) { ModelDelta delta = buildRootDelta(); addTarget(delta, thread); diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDAVirtualFindAction.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDAVirtualFindAction.java index d594d8fab..b5e613ef3 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDAVirtualFindAction.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDAVirtualFindAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2012 IBM Corporation and others. + * Copyright (c) 2004, 2013 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 @@ -62,7 +62,7 @@ import org.eclipse.ui.texteditor.IUpdate; */ public class PDAVirtualFindAction extends Action implements IUpdate { - private TreeModelViewer fClientViewer; + private final TreeModelViewer fClientViewer; protected class VirtualViewerListener implements IViewerUpdateListener, ILabelUpdateListener { @@ -121,8 +121,8 @@ public class PDAVirtualFindAction extends Action implements IUpdate { } private static class FindLabelProvider extends LabelProvider { - private VirtualTreeModelViewer fVirtualViewer; - private Map fTextCache = new HashMap(); + private final VirtualTreeModelViewer fVirtualViewer; + private final Map fTextCache = new HashMap(); public FindLabelProvider(VirtualTreeModelViewer viewer, List items) { fVirtualViewer = viewer; for (int i = 0; i < items.size(); i++) { @@ -141,7 +141,7 @@ public class PDAVirtualFindAction extends Action implements IUpdate { } public PDAVirtualFindAction(IPresentationContext context) { - setText("Find"); + setText("Find"); //$NON-NLS-1$ setId(DebugUIPlugin.getUniqueIdentifier() + ".FindElementAction"); //$NON-NLS-1$ PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.FIND_ELEMENT_ACTION); setActionDefinitionId(IWorkbenchCommandConstants.EDIT_FIND_AND_REPLACE); @@ -280,8 +280,8 @@ public class PDAVirtualFindAction extends Action implements IUpdate { fClientViewer.getControl().getShell(), labelProvider, items.toArray()); - dialog.setTitle("PDA Variables View Find"); - dialog.setMessage("&Specify an element to select (? = any character, * = any String):"); + dialog.setTitle("PDA Variables View Find"); //$NON-NLS-1$ + dialog.setMessage("&Specify an element to select (? = any character, * = any String):"); //$NON-NLS-1$ if (dialog.open() == Window.OK) { Object[] elements = dialog.getResult(); if (elements.length == 1) { @@ -304,9 +304,9 @@ public class PDAVirtualFindAction extends Action implements IUpdate { } else { DebugUIPlugin.errorDialog( fClientViewer.getControl().getShell(), - "Error", - "Could not select item:" + labelProvider.getText(findItem), - new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), "Element no longer in viewer.")); + "Error", //$NON-NLS-1$ + "Could not select item:" + labelProvider.getText(findItem), //$NON-NLS-1$ + new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), "Element no longer in viewer.")); //$NON-NLS-1$ } } diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDABreakpointAdapter.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDABreakpointAdapter.java index 0f2639f7c..6eba0bad9 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDABreakpointAdapter.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDABreakpointAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2008 IBM Corporation and others. + * Copyright (c) 2005, 2013 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 @@ -81,7 +81,7 @@ public class PDABreakpointAdapter implements IToggleBreakpointsTargetExtension { IResource resource = (IResource) editorPart.getEditorInput().getAdapter(IResource.class); if (resource != null) { String extension = resource.getFileExtension(); - if (extension != null && extension.equals("pda")) { + if (extension != null && extension.equals("pda")) { //$NON-NLS-1$ return editorPart; } } @@ -161,7 +161,7 @@ public class PDABreakpointAdapter implements IToggleBreakpointsTargetExtension { IDocument document = documentProvider.getDocument(editor.getEditorInput()); IRegion region = document.getLineInformationOfOffset(textSelection.getOffset()); String string = document.get(region.getOffset(), region.getLength()).trim(); - if (string.startsWith("var ")) { + if (string.startsWith("var ")) { //$NON-NLS-1$ String varName = string.substring(4).trim(); String fcnName = getFunctionName(document, varName, document.getLineOfOffset(textSelection.getOffset())); return new String[] {varName, fcnName}; @@ -194,9 +194,9 @@ public class PDABreakpointAdapter implements IToggleBreakpointsTargetExtension { try { IRegion information = document.getLineInformation(lineIndex); String lineText = document.get(information.getOffset(), information.getLength()); - if (lineText.startsWith(":")) { + if (lineText.startsWith(":")) { //$NON-NLS-1$ String label = lineText.substring(1); - if (source.indexOf("call " + label) >= 0) { + if (source.indexOf("call " + label) >= 0) { //$NON-NLS-1$ return label; } } @@ -204,7 +204,7 @@ public class PDABreakpointAdapter implements IToggleBreakpointsTargetExtension { } catch (BadLocationException e) { } } - return "_main_"; + return "_main_"; //$NON-NLS-1$ } /* (non-Javadoc) diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAEditorAdapterFactory.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAEditorAdapterFactory.java index c67200a40..4fd2f8504 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAEditorAdapterFactory.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAEditorAdapterFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2007 IBM Corporation and others. + * Copyright (c) 2005, 2013 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 @@ -32,7 +32,7 @@ public class PDAEditorAdapterFactory implements IAdapterFactory { IResource resource = (IResource) editorPart.getEditorInput().getAdapter(IResource.class); if (resource != null) { String extension = resource.getFileExtension(); - if (extension != null && extension.equals("pda")) { + if (extension != null && extension.equals("pda")) { //$NON-NLS-1$ if (adapterType.equals(IToggleBreakpointsTarget.class)) { return new PDABreakpointAdapter(); } diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAToggleWatchpointsTarget.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAToggleWatchpointsTarget.java index 4c51afeb9..f5f6afb89 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAToggleWatchpointsTarget.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAToggleWatchpointsTarget.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 IBM Corporation and others. + * Copyright (c) 2008, 2013 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 @@ -85,7 +85,7 @@ public class PDAToggleWatchpointsTarget extends PDABreakpointAdapter { final PDAStackFrame frame = var.getStackFrame(); final Shell shell = part.getSite().getShell(); - new Job("Toggle PDA Watchpoint") { + new Job("Toggle PDA Watchpoint") { //$NON-NLS-1$ { setSystem(true); } protected IStatus run(IProgressMonitor monitor) { @@ -98,11 +98,11 @@ public class PDAToggleWatchpointsTarget extends PDABreakpointAdapter { } catch (final CoreException e) { // Need to switch back to the UI thread to show the error // dialog. - new WorkbenchJob(shell.getDisplay(), "Toggle PDA Watchpoint") { + new WorkbenchJob(shell.getDisplay(), "Toggle PDA Watchpoint") { //$NON-NLS-1$ { setSystem(true); } - public IStatus runInUIThread(IProgressMonitor monitor) { - ErrorDialog.openError(shell, "Failed to create PDA watchpoint", "Failed to create PDA watchpoint.\n", e.getStatus()); + public IStatus runInUIThread(IProgressMonitor submonitor) { + ErrorDialog.openError(shell, "Failed to create PDA watchpoint", "Failed to create PDA watchpoint.\n", e.getStatus()); //$NON-NLS-1$ //$NON-NLS-2$ return Status.OK_STATUS; } }.schedule(); @@ -129,8 +129,8 @@ public class PDAToggleWatchpointsTarget extends PDABreakpointAdapter { try { while(true) { String line = reader.readLine().trim(); - if (line.startsWith("var")) { - String varName = line.substring("var".length()).trim(); + if (line.startsWith("var")) { //$NON-NLS-1$ + String varName = line.substring("var".length()).trim(); //$NON-NLS-1$ if (varName.equals(var)) { break; } diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAToggleWatchpointsTargetFactory.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAToggleWatchpointsTargetFactory.java index 9c9ebd9cc..e0f5c2652 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAToggleWatchpointsTargetFactory.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAToggleWatchpointsTargetFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 Wind River Systems and others. + * Copyright (c) 2008, 2013 Wind River Systems 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 @@ -7,6 +7,7 @@ * * Contributors: * Wind River Systems - initial API and implementation + * IBM Corporation - bug fixing *******************************************************************************/ package org.eclipse.debug.examples.ui.pda.breakpoints; @@ -27,13 +28,13 @@ import org.eclipse.ui.IWorkbenchPart; */ public class PDAToggleWatchpointsTargetFactory implements IToggleBreakpointsTargetFactory { - private static final String TOGGLE_WATCHPOINT_TARGET_ACCESS = "org.eclipse.debug.examples.ui.pda.watchpoint_access"; - private static final String TOGGLE_WATCHPOINT_TARGET_MODIFICATION = "org.eclipse.debug.examples.ui.pda.watchpoint_modification"; - private static final String TOGGLE_WATCHPOINT_TARGET_BOTH = "org.eclipse.debug.examples.ui.pda.watchpoint_both"; + private static final String TOGGLE_WATCHPOINT_TARGET_ACCESS = "org.eclipse.debug.examples.ui.pda.watchpoint_access"; //$NON-NLS-1$ + private static final String TOGGLE_WATCHPOINT_TARGET_MODIFICATION = "org.eclipse.debug.examples.ui.pda.watchpoint_modification"; //$NON-NLS-1$ + private static final String TOGGLE_WATCHPOINT_TARGET_BOTH = "org.eclipse.debug.examples.ui.pda.watchpoint_both"; //$NON-NLS-1$ private static Set TOGGLE_WATCHPOINTS_TARGETS = new LinkedHashSet(); - private Map fToggleWatchpointTargets = new HashMap(3); + private final Map fToggleWatchpointTargets = new HashMap(3); static { TOGGLE_WATCHPOINTS_TARGETS.add(TOGGLE_WATCHPOINT_TARGET_BOTH); @@ -68,11 +69,11 @@ public class PDAToggleWatchpointsTargetFactory implements IToggleBreakpointsTarg public String getToggleTargetName(String targetID) { if (TOGGLE_WATCHPOINT_TARGET_BOTH.equals(targetID)) { - return "Watchpoints (Read/Write)"; + return "Watchpoints (Read/Write)"; //$NON-NLS-1$ } else if (TOGGLE_WATCHPOINT_TARGET_ACCESS.equals(targetID)) { - return "Watchpoints (Read)"; + return "Watchpoints (Read)"; //$NON-NLS-1$ } else if (TOGGLE_WATCHPOINT_TARGET_MODIFICATION.equals(targetID)) { - return "Watchpoints (Write)"; + return "Watchpoints (Write)"; //$NON-NLS-1$ } else { return null; } diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistProcessor.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistProcessor.java index 5d7089472..469bf452f 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistProcessor.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistProcessor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2007 IBM Corporation and others. + * Copyright (c) 2005, 2013 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 @@ -48,14 +48,14 @@ public class PDAContentAssistProcessor implements IContentAssistProcessor { for (int i = 0; i < keywords.length; i++) { String keyword = keywords[i]; if (keyword.startsWith(word) && word.length() < keyword.length()) { - proposals.add(new CompletionProposal(keyword + " ", index + 1, offset - (index + 1), keyword.length() + 1)); + proposals.add(new CompletionProposal(keyword + " ", index + 1, offset - (index + 1), keyword.length() + 1)); //$NON-NLS-1$ } } } else { // propose all keywords for (int i = 0; i < keywords.length; i++) { String keyword = keywords[i]; - proposals.add(new CompletionProposal(keyword + " ", offset, 0, keyword.length() + 1)); + proposals.add(new CompletionProposal(keyword + " ", offset, 0, keyword.length() + 1)); //$NON-NLS-1$ } } if (!proposals.isEmpty()) { diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAEditor.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAEditor.java index 3617cb172..2d7ab812e 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAEditor.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAEditor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2007 IBM Corporation and others. + * Copyright (c) 2005, 2013 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 @@ -29,8 +29,8 @@ public class PDAEditor extends AbstractDecoratedTextEditor { public PDAEditor() { super(); setSourceViewerConfiguration(new PDASourceViewerConfiguration()); - setRulerContextMenuId("pda.editor.rulerMenu"); - setEditorContextMenuId("pda.editor.editorMenu"); + setRulerContextMenuId("pda.editor.rulerMenu"); //$NON-NLS-1$ + setEditorContextMenuId("pda.editor.editorMenu"); //$NON-NLS-1$ } /* (non-Javadoc) diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAScanner.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAScanner.java index b62d0ba45..2956ada7a 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAScanner.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAScanner.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2007 IBM Corporation and others. + * Copyright (c) 2005, 2013 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 @@ -29,8 +29,8 @@ public class PDAScanner extends BufferedRuleBasedScanner { * PDA keywods */ public static final String[] fgKeywords = new String[] { - "add", "branch_not_zero", "call", "dec", "dup", - "halt", "output", "pop", "push", "return", "var" + "add", "branch_not_zero", "call", "dec", "dup", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ + "halt", "output", "pop", "push", "return", "var" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ }; /** diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/TextHover.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/TextHover.java index 6b14e4c74..26ca31c0c 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/TextHover.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/TextHover.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2007 IBM Corporation and others. + * Copyright (c) 2005, 2013 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 @@ -40,7 +40,7 @@ public class TextHover implements ITextHover { } catch (BadLocationException e) { return null; } - if (varName.startsWith("$") && varName.length() > 1) { + if (varName.startsWith("$") && varName.length() > 1) { //$NON-NLS-1$ varName = varName.substring(1); } @@ -72,7 +72,7 @@ public class TextHover implements ITextHover { for (int i = 0; i < variables.length; i++) { IVariable variable = variables[i]; if (variable.getName().equals(varName)) { - return varName + " = " + variable.getValue().getValueString(); + return varName + " = " + variable.getValue().getValueString(); //$NON-NLS-1$ } } } catch (DebugException e) { diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDAMainTab.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDAMainTab.java index ea854dad9..a99f6834d 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDAMainTab.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDAMainTab.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2012 IBM Corporation and others. + * Copyright (c) 2005, 2013 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 @@ -66,7 +66,7 @@ public class PDAMainTab extends AbstractLaunchConfigurationTab { createVerticalSpacer(comp, 3); Label programLabel = new Label(comp, SWT.NONE); - programLabel.setText("&Program:"); + programLabel.setText("&Program:"); //$NON-NLS-1$ GridData gd = new GridData(GridData.BEGINNING); programLabel.setLayoutData(gd); programLabel.setFont(font); @@ -94,8 +94,8 @@ public class PDAMainTab extends AbstractLaunchConfigurationTab { */ protected void browsePDAFiles() { ResourceListSelectionDialog dialog = new ResourceListSelectionDialog(getShell(), ResourcesPlugin.getWorkspace().getRoot(), IResource.FILE); - dialog.setTitle("PDA Program"); - dialog.setMessage("Select PDA Program"); + dialog.setTitle("PDA Program"); //$NON-NLS-1$ + dialog.setMessage("Select PDA Program"); //$NON-NLS-1$ if (dialog.open() == Window.OK) { Object[] files = dialog.getResult(); IFile file = (IFile) files[0]; @@ -161,7 +161,7 @@ public class PDAMainTab extends AbstractLaunchConfigurationTab { * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName() */ public String getName() { - return "Main"; + return "Main"; //$NON-NLS-1$ } /* (non-Javadoc) @@ -180,15 +180,15 @@ public class PDAMainTab extends AbstractLaunchConfigurationTab { IPath path = new Path(text); IResource member = ResourcesPlugin.getWorkspace().getRoot().findMember(path); if (member == null) { - setErrorMessage("Specified program does not exist"); + setErrorMessage("Specified program does not exist"); //$NON-NLS-1$ return false; } else { if (member.getType() != IResource.FILE) { - setWarningMessage("Specified program is not a file."); + setWarningMessage("Specified program is not a file."); //$NON-NLS-1$ } } } else { - setMessage("Specify a program"); + setMessage("Specify a program"); //$NON-NLS-1$ } //#endif return true; diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/presentation/PDAModelPresentation.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/presentation/PDAModelPresentation.java index 7d5d3ba91..4f5455edb 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/presentation/PDAModelPresentation.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/presentation/PDAModelPresentation.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2007 IBM Corporation and others. + * Copyright (c) 2005, 2013 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 @@ -66,12 +66,12 @@ public class PDAModelPresentation extends LabelProvider implements IDebugModelPr */ private String getWatchpointText(PDAWatchpoint watchpoint) { try { - String label = watchpoint.getVariableName() + " (" + watchpoint.getFunctionName() + ")"; + String label = watchpoint.getVariableName() + " (" + watchpoint.getFunctionName() + ")"; //$NON-NLS-1$ //$NON-NLS-2$ if (watchpoint.isAccess()) { - label += " [read]"; + label += " [read]"; //$NON-NLS-1$ } if (watchpoint.isModification()) { - label += " [write]"; + label += " [write]"; //$NON-NLS-1$ } return label; } catch (CoreException e) { @@ -89,15 +89,15 @@ public class PDAModelPresentation extends LabelProvider implements IDebugModelPr String pgmPath = target.getLaunch().getLaunchConfiguration().getAttribute(DebugCorePlugin.ATTR_PDA_PROGRAM, (String)null); if (pgmPath != null) { IPath path = new Path(pgmPath); - String label = ""; + String label = ""; //$NON-NLS-1$ if (target.isTerminated()) { - label = "<terminated>"; + label = "<terminated>"; //$NON-NLS-1$ } - return label + "PDA [" + path.lastSegment() + "]"; + return label + "PDA [" + path.lastSegment() + "]"; //$NON-NLS-1$ //$NON-NLS-2$ } } catch (CoreException e) { } - return "PDA"; + return "PDA"; //$NON-NLS-1$ } @@ -109,7 +109,7 @@ public class PDAModelPresentation extends LabelProvider implements IDebugModelPr */ private String getStackFrameText(PDAStackFrame frame) { try { - return frame.getName() + " (line: " + frame.getLineNumber() + ")"; + return frame.getName() + " (line: " + frame.getLineNumber() + ")"; //$NON-NLS-1$ //$NON-NLS-2$ } catch (DebugException e) { } return null; @@ -125,14 +125,14 @@ public class PDAModelPresentation extends LabelProvider implements IDebugModelPr private String getThreadText(PDAThread thread) { String label = thread.getName(); if (thread.isStepping()) { - label += " (stepping)"; + label += " (stepping)"; //$NON-NLS-1$ } else if (thread.isSuspended()) { IBreakpoint[] breakpoints = thread.getBreakpoints(); if (breakpoints.length == 0) { if (thread.getError() == null) { - label += " (suspended)"; + label += " (suspended)"; //$NON-NLS-1$ } else { - label += " (" + thread.getError() + ")"; + label += " (" + thread.getError() + ")"; //$NON-NLS-1$ //$NON-NLS-2$ } } else { IBreakpoint breakpoint = breakpoints[0]; // there can only be one in PDA @@ -141,18 +141,18 @@ public class PDAModelPresentation extends LabelProvider implements IDebugModelPr if (pdaBreakpoint instanceof PDAWatchpoint) { try { PDAWatchpoint watchpoint = (PDAWatchpoint)pdaBreakpoint; - label += " (watchpoint: " + watchpoint.getSuspendType() + " " + watchpoint.getVariableName() + ")"; + label += " (watchpoint: " + watchpoint.getSuspendType() + " " + watchpoint.getVariableName() + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ } catch (CoreException e) { } } else if (pdaBreakpoint.isRunToLineBreakpoint()) { - label += " (run to line)"; + label += " (run to line)"; //$NON-NLS-1$ } else { - label += " (suspended at line breakpoint)"; + label += " (suspended at line breakpoint)"; //$NON-NLS-1$ } } } } else if (thread.isTerminated()) { - label = "<terminated> " + label; + label = "<terminated> " + label; //$NON-NLS-1$ } return label; } @@ -161,7 +161,7 @@ public class PDAModelPresentation extends LabelProvider implements IDebugModelPr * @see org.eclipse.debug.ui.IDebugModelPresentation#computeDetail(org.eclipse.debug.core.model.IValue, org.eclipse.debug.ui.IValueDetailListener) */ public void computeDetail(IValue value, IValueDetailListener listener) { - String detail = ""; + String detail = ""; //$NON-NLS-1$ try { detail = value.getValueString(); } catch (DebugException e) { @@ -185,7 +185,7 @@ public class PDAModelPresentation extends LabelProvider implements IDebugModelPr */ public String getEditorId(IEditorInput input, Object element) { if (element instanceof IFile || element instanceof ILineBreakpoint) { - return "pda.editor"; + return "pda.editor"; //$NON-NLS-1$ } return null; } diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/AbstractDataStackViewHandler.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/AbstractDataStackViewHandler.java index d9a279f4b..de469e544 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/AbstractDataStackViewHandler.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/AbstractDataStackViewHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2009 Wind River Systems and others. + * Copyright (c) 2008, 2013 Wind River Systems 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 @@ -7,6 +7,7 @@ * * Contributors: * Wind River Systems - initial API and implementation + * IBM Corporation - bug fixing *******************************************************************************/ package org.eclipse.debug.examples.ui.pda.views; @@ -50,7 +51,7 @@ abstract public class AbstractDataStackViewHandler extends AbstractHandler { } } } else { - throw new ExecutionException("Handler must be with DataStackView only"); + throw new ExecutionException("Handler must be with DataStackView only"); //$NON-NLS-1$ } return null; } diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/CanPushTester.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/CanPushTester.java index 10b5acd31..f44bf86da 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/CanPushTester.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/CanPushTester.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2009 Wind River Systems and others. + * Copyright (c) 2008, 2013 Wind River Systems 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 @@ -7,6 +7,7 @@ * * Contributors: * Wind River Systems - initial API and implementation + * IBM Corporation - bug fixing *******************************************************************************/ package org.eclipse.debug.examples.ui.pda.views; @@ -22,7 +23,7 @@ import org.eclipse.debug.examples.core.pda.model.PDAThread; */ public class CanPushTester extends PropertyTester { - private static final String CAN_PUSH_PROPERTY = "canPush"; + private static final String CAN_PUSH_PROPERTY = "canPush"; //$NON-NLS-1$ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) { if (CAN_PUSH_PROPERTY.equals(property)) { diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/CheckboxView.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/CheckboxView.java index 13c5cb885..5accdf183 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/CheckboxView.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/CheckboxView.java @@ -1,5 +1,5 @@ /***************************************************************** - * Copyright (c) 2009 Texas Instruments and others + * Copyright (c) 2009, 2013 Texas Instruments 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 @@ -15,7 +15,7 @@ import org.eclipse.debug.internal.ui.views.variables.VariablesView; import org.eclipse.swt.SWT; public class CheckboxView extends VariablesView { - public static String ID = "CHECKBOX_VIEW_ID"; + public static String ID = "CHECKBOX_VIEW_ID"; //$NON-NLS-1$ protected int getViewerStyle() { return SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.VIRTUAL | SWT.FULL_SELECTION | SWT.CHECK; diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/DataStackView.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/DataStackView.java index 5e040fdbe..d6ec8a50a 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/DataStackView.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/DataStackView.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2010 IBM Corporation and others. + * Copyright (c) 2005, 2013 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 @@ -10,7 +10,7 @@ * Bjorn Freeman-Benson - initial API and implementation * Wind River - Pawel Piech - replaced actions with handlers (bug 229219) * Pawel Piech (Wind River) - ported PDA Virtual Machine to Java (Bug 261400) -******************************************************************************/ + ******************************************************************************/ package org.eclipse.debug.examples.ui.pda.views; import org.eclipse.core.runtime.IProgressMonitor; @@ -139,7 +139,7 @@ public class DataStackView extends AbstractDebugView implements IDebugContextLis } public void debugContextChanged(final DebugContextEvent event) { - new UIJob(getSite().getShell().getDisplay(), "DataStackView update") { + new UIJob(getSite().getShell().getDisplay(), "DataStackView update") { //$NON-NLS-1$ { setSystem(true); } diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PopHandler.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PopHandler.java index 1c0c5bc72..37157162b 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PopHandler.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PopHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2009 Wind River Systems and others. + * Copyright (c) 2008, 2013 Wind River Systems 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 @@ -7,6 +7,7 @@ * * Contributors: * Wind River Systems - initial API and implementation + * IBM Corporation - bug fixing *******************************************************************************/ package org.eclipse.debug.examples.ui.pda.views; @@ -51,7 +52,7 @@ public class PopHandler extends AbstractDataStackViewHandler { thread.pushData(value.getValueString()); } } catch (DebugException e) { - throw new ExecutionException("Failed to execute push command", e); + throw new ExecutionException("Failed to execute push command", e); //$NON-NLS-1$ } viewer.refresh(); } diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PushHandler.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PushHandler.java index 58fbc7c0e..d8fb433cc 100644 --- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PushHandler.java +++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PushHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2009 Wind River Systems and others. + * Copyright (c) 2008, 2013 Wind River Systems 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 @@ -7,6 +7,7 @@ * * Contributors: * Wind River Systems - initial API and implementation + * IBM Corporation - bug fixing *******************************************************************************/ package org.eclipse.debug.examples.ui.pda.views; @@ -23,12 +24,12 @@ import org.eclipse.jface.window.Window; public class PushHandler extends AbstractDataStackViewHandler { protected void doExecute(DataStackView view, PDAThread thread, ISelection selection) throws ExecutionException { - InputDialog dialog = new InputDialog(view.getSite().getShell(), "Specify Value", "Enter value to push", null, null); + InputDialog dialog = new InputDialog(view.getSite().getShell(), "Specify Value", "Enter value to push", null, null); //$NON-NLS-1$ //$NON-NLS-2$ if (dialog.open() == Window.OK) { try { thread.pushData(dialog.getValue()); } catch (DebugException e) { - throw new ExecutionException("Failed to execute push command", e); + throw new ExecutionException("Failed to execute push command", e); //$NON-NLS-1$ } } view.getViewer().refresh(); |