mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 17:35:35 +02:00
Remove unused imports and changing some scopes to
not generate synthetic methods.
This commit is contained in:
parent
05f2fa57f8
commit
195442a581
39 changed files with 157 additions and 210 deletions
|
@ -114,7 +114,7 @@ public final class MoveTextEdit extends TextEdit {
|
|||
|
||||
//---- Helper method ---------------------------------------------------------------------------------
|
||||
|
||||
private void internalPerform(TextBuffer buffer) throws CoreException {
|
||||
protected void internalPerform(TextBuffer buffer) throws CoreException {
|
||||
Assert.isTrue(fPerformCounter < 2);
|
||||
if (++fPerformCounter == 2) {
|
||||
TextRange source= getSourceRange();
|
||||
|
|
|
@ -32,7 +32,7 @@ import org.eclipse.ui.texteditor.IDocumentProvider;
|
|||
|
||||
/* package */ class TextBufferFactory {
|
||||
|
||||
private IDocumentProvider fDocumentProvider;
|
||||
protected IDocumentProvider fDocumentProvider;
|
||||
private Map fFileValueMap;
|
||||
private Map fBufferValueMap;
|
||||
|
||||
|
|
|
@ -311,7 +311,7 @@ import org.eclipse.jface.util.Assert;
|
|||
return new RootNode(length);
|
||||
}
|
||||
|
||||
private TextEditNode(TextEdit edit) {
|
||||
protected TextEditNode(TextEdit edit) {
|
||||
fEdit= edit;
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ import org.eclipse.ui.texteditor.TextEditorAction;
|
|||
public class BuildConsoleView extends ViewPart {
|
||||
|
||||
|
||||
private TextViewer fTextViewer;
|
||||
protected TextViewer fTextViewer;
|
||||
private ClearConsoleAction fClearOutputAction;
|
||||
private TextEditorAction fCopyAction;
|
||||
private TextEditorAction fSelectAllAction;
|
||||
|
@ -99,7 +99,7 @@ public class BuildConsoleView extends ViewPart {
|
|||
WorkbenchHelp.setHelp(fTextViewer.getControl(), ICHelpContextIds.CLEAR_CONSOLE_VIEW);
|
||||
}
|
||||
|
||||
private void initializeWidgetFont(StyledText styledText) {
|
||||
protected void initializeWidgetFont(StyledText styledText) {
|
||||
IPreferenceStore store= CPlugin.getDefault().getPreferenceStore();
|
||||
String prefKey= CPluginPreferencePage.PREF_CONSOLE_FONT;
|
||||
FontData data= null;
|
||||
|
|
|
@ -165,7 +165,7 @@ public class CContentProvider extends BaseCElementContentProvider implements ITr
|
|||
});
|
||||
}
|
||||
|
||||
private boolean updateContainer(ICProject cproject) {
|
||||
protected boolean updateContainer(ICProject cproject) {
|
||||
IParent binContainer = cproject.getBinaryContainer();
|
||||
IParent libContainer = cproject.getArchiveContainer();
|
||||
if (binContainer != null) {
|
||||
|
|
|
@ -137,7 +137,7 @@ public class CPlugin extends AbstractUIPlugin {
|
|||
private ProblemMarkerManager fProblemMarkerManager;
|
||||
|
||||
static class ConsoleDocument extends ConsoleOutputStream implements IConsole {
|
||||
private IDocument fDocument;
|
||||
protected IDocument fDocument;
|
||||
|
||||
public ConsoleDocument() {
|
||||
fDocument = new Document();
|
||||
|
|
|
@ -228,7 +228,7 @@ public class CView extends ViewPart implements IMenuListener, ISetSelectionTarge
|
|||
* Handles double clicks in viewer.
|
||||
* Opens editor if file double-clicked.
|
||||
*/
|
||||
private void handleDoubleClick(DoubleClickEvent event) {
|
||||
protected void handleDoubleClick(DoubleClickEvent event) {
|
||||
IStructuredSelection s = (IStructuredSelection)event.getSelection();
|
||||
//Object element = s.getFirstElement();
|
||||
IAdaptable element = (IAdaptable)s.getFirstElement();
|
||||
|
|
|
@ -44,7 +44,7 @@ public abstract class AbstractElementListSelectionDialog extends SelectionStatus
|
|||
/*
|
||||
* @private
|
||||
*/
|
||||
private void access$superOpen() {
|
||||
protected void access$superOpen() {
|
||||
super.open();
|
||||
}
|
||||
/*
|
||||
|
|
|
@ -25,7 +25,7 @@ public class MessageLine extends CLabel {
|
|||
|
||||
private Color fDefaultColor;
|
||||
private RGB fErrorRGB;
|
||||
private Color fErrorColor;
|
||||
protected Color fErrorColor;
|
||||
|
||||
private static RGB fgErrorRGB= new RGB(200, 0, 0);
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class SelectionList extends Composite {
|
|||
|
||||
// State
|
||||
private Object[] fElements;
|
||||
private ILabelProvider fRenderer;
|
||||
protected ILabelProvider fRenderer;
|
||||
private boolean fIgnoreCase;
|
||||
|
||||
// Implementation details
|
||||
|
|
|
@ -96,7 +96,7 @@ public class CContentOutlinePage extends Page implements IContentOutlinePage, IS
|
|||
}
|
||||
}
|
||||
|
||||
private ISelection updateSelection(ISelection sel) {
|
||||
protected ISelection updateSelection(ISelection sel) {
|
||||
ArrayList newSelection= new ArrayList();
|
||||
if (sel instanceof IStructuredSelection) {
|
||||
Iterator iter= ((IStructuredSelection)sel).iterator();
|
||||
|
@ -114,7 +114,7 @@ public class CContentOutlinePage extends Page implements IContentOutlinePage, IS
|
|||
/**
|
||||
* called to create the context menu of the outline
|
||||
*/
|
||||
private void contextMenuAboutToShow(IMenuManager menu) {
|
||||
protected void contextMenuAboutToShow(IMenuManager menu) {
|
||||
if (OpenIncludeAction.canActionBeAdded(getSelection())) {
|
||||
menu.add(fOpenIncludeAction);
|
||||
}
|
||||
|
|
|
@ -5,11 +5,9 @@ package org.eclipse.cdt.internal.ui.editor;
|
|||
* All Rights Reserved.
|
||||
*/
|
||||
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
||||
import org.eclipse.core.resources.IStorage;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
|
||||
|
||||
import org.eclipse.jface.text.AbstractDocument;
|
||||
import org.eclipse.jface.text.DefaultLineTracker;
|
||||
import org.eclipse.jface.text.GapTextStore;
|
||||
|
@ -18,14 +16,10 @@ import org.eclipse.jface.text.IDocumentExtension;
|
|||
import org.eclipse.jface.text.IDocumentListener;
|
||||
import org.eclipse.jface.text.IDocumentPartitioner;
|
||||
import org.eclipse.jface.text.source.IAnnotationModel;
|
||||
|
||||
|
||||
import org.eclipse.ui.IFileEditorInput;
|
||||
import org.eclipse.ui.IStorageEditorInput;
|
||||
import org.eclipse.ui.editors.text.FileDocumentProvider;
|
||||
|
||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
||||
|
||||
public class CDocumentProvider extends FileDocumentProvider {
|
||||
|
||||
static private class RegisteredReplace {
|
||||
|
|
|
@ -5,11 +5,11 @@ package org.eclipse.cdt.internal.ui.editor;
|
|||
* All Rights Reserved.
|
||||
*/
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import org.eclipse.jface.action.IContributionItem;
|
||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
||||
import org.eclipse.cdt.internal.ui.CPluginImages;
|
||||
import org.eclipse.cdt.internal.ui.IContextMenuConstants;
|
||||
import org.eclipse.jface.action.IMenuManager;
|
||||
import org.eclipse.jface.action.IStatusLineManager;
|
||||
import org.eclipse.jface.action.IToolBarManager;
|
||||
|
@ -21,17 +21,11 @@ import org.eclipse.jface.viewers.SelectionChangedEvent;
|
|||
import org.eclipse.ui.IEditorPart;
|
||||
import org.eclipse.ui.IWorkbenchActionConstants;
|
||||
import org.eclipse.ui.texteditor.BasicTextEditorActionContributor;
|
||||
import org.eclipse.ui.texteditor.IStatusField;
|
||||
import org.eclipse.ui.texteditor.ITextEditor;
|
||||
import org.eclipse.ui.texteditor.RetargetTextEditorAction;
|
||||
import org.eclipse.ui.texteditor.StatusLineContributionItem;
|
||||
import org.eclipse.ui.texteditor.TextEditorAction;
|
||||
import org.eclipse.ui.texteditor.TextOperationAction;
|
||||
|
||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
||||
import org.eclipse.cdt.internal.ui.CPluginImages;
|
||||
import org.eclipse.cdt.internal.ui.IContextMenuConstants;
|
||||
|
||||
|
||||
public class CEditorActionContributor extends BasicTextEditorActionContributor {
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ import org.eclipse.ui.IEditorInput;
|
|||
*/
|
||||
public class CEditorErrorTickUpdater implements IAnnotationModelListener {
|
||||
|
||||
private CEditor fCEditor;
|
||||
protected CEditor fCEditor;
|
||||
private IAnnotationModel fAnnotationModel;
|
||||
private CElementLabelProvider fLabelProvider;
|
||||
|
||||
|
|
|
@ -152,9 +152,9 @@ public class OverviewRuler {
|
|||
|
||||
|
||||
/** The model of the overview ruler */
|
||||
private IAnnotationModel fModel;
|
||||
protected IAnnotationModel fModel;
|
||||
/** The view to which this ruler is connected */
|
||||
private ITextViewer fTextViewer;
|
||||
protected ITextViewer fTextViewer;
|
||||
/** The ruler's canvas */
|
||||
private Canvas fCanvas;
|
||||
/** The drawable for double buffering */
|
||||
|
@ -186,7 +186,7 @@ public class OverviewRuler {
|
|||
return fWidth;
|
||||
}
|
||||
|
||||
private int getType(Annotation annotation) {
|
||||
protected int getType(Annotation annotation) {
|
||||
if (annotation instanceof IProblemAnnotation) {
|
||||
IProblemAnnotation pa= (IProblemAnnotation) annotation;
|
||||
//if (!pa.isRelevant())
|
||||
|
@ -259,7 +259,7 @@ public class OverviewRuler {
|
|||
/**
|
||||
* Disposes the ruler's resources.
|
||||
*/
|
||||
private void handleDispose() {
|
||||
protected void handleDispose() {
|
||||
|
||||
if (fTextViewer != null) {
|
||||
fTextViewer.removeTextListener(fInternalListener);
|
||||
|
@ -283,7 +283,7 @@ public class OverviewRuler {
|
|||
/**
|
||||
* Double buffer drawing.
|
||||
*/
|
||||
private void doubleBufferPaint(GC dest) {
|
||||
protected void doubleBufferPaint(GC dest) {
|
||||
|
||||
Point size= fCanvas.getSize();
|
||||
|
||||
|
@ -408,7 +408,7 @@ public class OverviewRuler {
|
|||
/**
|
||||
* Redraws the overview ruler.
|
||||
*/
|
||||
private void redraw() {
|
||||
protected void redraw() {
|
||||
if (fCanvas != null && !fCanvas.isDisposed()) {
|
||||
GC gc= new GC(fCanvas);
|
||||
doubleBufferPaint(gc);
|
||||
|
@ -472,7 +472,7 @@ public class OverviewRuler {
|
|||
return found;
|
||||
}
|
||||
|
||||
private void handleMouseDown(MouseEvent event) {
|
||||
protected void handleMouseDown(MouseEvent event) {
|
||||
if (fTextViewer != null) {
|
||||
int[] lines= toLineNumbers(event.y);
|
||||
Position p= getProblemPositionAt(lines);
|
||||
|
@ -484,7 +484,7 @@ public class OverviewRuler {
|
|||
}
|
||||
}
|
||||
|
||||
private void handleMouseMove(MouseEvent event) {
|
||||
protected void handleMouseMove(MouseEvent event) {
|
||||
if (fTextViewer != null) {
|
||||
int[] lines= toLineNumbers(event.y);
|
||||
Position p= getProblemPositionAt(lines);
|
||||
|
|
|
@ -94,8 +94,8 @@ public final class PaintManager implements KeyListener, MouseListener, ISelectio
|
|||
|
||||
private List fPainters= new ArrayList(2);
|
||||
private PositionManager fManager;
|
||||
private ISourceViewer fSourceViewer;
|
||||
private boolean fTextChanged= false;
|
||||
protected ISourceViewer fSourceViewer;
|
||||
protected boolean fTextChanged= false;
|
||||
private boolean fAutoRepeat= false;
|
||||
|
||||
|
||||
|
@ -163,7 +163,7 @@ public final class PaintManager implements KeyListener, MouseListener, ISelectio
|
|||
}
|
||||
}
|
||||
|
||||
private void paint(int reason) {
|
||||
protected void paint(int reason) {
|
||||
for (Iterator e = fPainters.iterator(); e.hasNext();)
|
||||
((IPainter) e.next()).paint(reason);
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ public class ProblemPainter implements IPainter, PaintListener, IAnnotationModel
|
|||
|
||||
private boolean fIsActive= false;
|
||||
private boolean fIsPainting= false;
|
||||
private boolean fIsModelChanging= false;
|
||||
protected boolean fIsModelChanging= false;
|
||||
|
||||
private Color fColor;
|
||||
private ITextEditor fTextEditor;
|
||||
|
@ -58,7 +58,7 @@ public class ProblemPainter implements IPainter, PaintListener, IAnnotationModel
|
|||
return !fProblemPositions.isEmpty();
|
||||
}
|
||||
|
||||
private void enablePainting() {
|
||||
protected void enablePainting() {
|
||||
if (!fIsPainting && hasProblems()) {
|
||||
fIsPainting= true;
|
||||
fTextWidget.addPaintListener(this);
|
||||
|
@ -66,7 +66,7 @@ public class ProblemPainter implements IPainter, PaintListener, IAnnotationModel
|
|||
}
|
||||
}
|
||||
|
||||
private void disablePainting(boolean redraw) {
|
||||
protected void disablePainting(boolean redraw) {
|
||||
if (fIsPainting) {
|
||||
fIsPainting= false;
|
||||
fTextWidget.removePaintListener(this);
|
||||
|
@ -75,7 +75,7 @@ public class ProblemPainter implements IPainter, PaintListener, IAnnotationModel
|
|||
}
|
||||
}
|
||||
|
||||
private void setModel(IAnnotationModel model) {
|
||||
protected void setModel(IAnnotationModel model) {
|
||||
|
||||
if (fModel != model) {
|
||||
if (fModel != null)
|
||||
|
|
|
@ -6,20 +6,18 @@ package org.eclipse.cdt.internal.ui.editor.asm;
|
|||
*/
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.cdt.internal.ui.text.AbstractCScanner;
|
||||
import org.eclipse.cdt.internal.ui.text.ICColorConstants;
|
||||
import org.eclipse.cdt.internal.ui.text.IColorManager;
|
||||
import org.eclipse.cdt.internal.ui.text.util.CWhitespaceDetector;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.jface.text.rules.EndOfLineRule;
|
||||
import org.eclipse.jface.text.rules.ICharacterScanner;
|
||||
import org.eclipse.jface.text.rules.IRule;
|
||||
import org.eclipse.jface.text.rules.IToken;
|
||||
import org.eclipse.jface.text.rules.IWordDetector;
|
||||
import org.eclipse.jface.text.rules.SingleLineRule;
|
||||
import org.eclipse.jface.text.rules.Token;
|
||||
import org.eclipse.jface.text.rules.WhitespaceRule;
|
||||
|
|
|
@ -5,7 +5,6 @@ package org.eclipse.cdt.internal.ui.editor.asm;
|
|||
* All Rights Reserved.
|
||||
*/
|
||||
|
||||
import org.eclipse.cdt.internal.ui.text.util.CColorManager;
|
||||
import org.eclipse.jface.text.IDocument;
|
||||
import org.eclipse.jface.text.presentation.IPresentationReconciler;
|
||||
import org.eclipse.jface.text.presentation.PresentationReconciler;
|
||||
|
|
|
@ -5,40 +5,28 @@ package org.eclipse.cdt.internal.ui.editor.asm;
|
|||
* All Rights Reserved.
|
||||
*/
|
||||
|
||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
||||
import org.eclipse.cdt.internal.ui.editor.CEditorMessages;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.text.MessageFormat;
|
||||
|
||||
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
|
||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
||||
import org.eclipse.cdt.internal.ui.editor.CEditorMessages;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IWorkspace;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
|
||||
|
||||
import org.eclipse.jface.action.IMenuManager;
|
||||
import org.eclipse.jface.dialogs.MessageDialog;
|
||||
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
|
||||
import org.eclipse.jface.util.PropertyChangeEvent;
|
||||
|
||||
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.ui.IEditorInput;
|
||||
import org.eclipse.ui.actions.WorkspaceModifyOperation;
|
||||
import org.eclipse.ui.dialogs.SaveAsDialog;
|
||||
import org.eclipse.ui.part.FileEditorInput;
|
||||
import org.eclipse.ui.texteditor.AbstractTextEditor;
|
||||
import org.eclipse.ui.texteditor.ConvertLineDelimitersAction;
|
||||
import org.eclipse.ui.texteditor.DefaultRangeIndicator;
|
||||
import org.eclipse.ui.texteditor.IAbstractTextEditorHelpContextIds;
|
||||
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
|
||||
import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
|
||||
import org.eclipse.ui.texteditor.ResourceAction;
|
||||
import org.eclipse.ui.texteditor.StatusTextEditor;
|
||||
|
||||
|
||||
|
|
|
@ -9,12 +9,10 @@ import org.eclipse.cdt.internal.ui.CPlugin;
|
|||
import org.eclipse.cdt.internal.ui.text.ICColorConstants;
|
||||
import org.eclipse.cdt.internal.ui.text.SingleTokenCScanner;
|
||||
import org.eclipse.cdt.internal.ui.text.util.CColorManager;
|
||||
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.jface.text.IDocumentPartitioner;
|
||||
import org.eclipse.jface.text.rules.DefaultPartitioner;
|
||||
import org.eclipse.jface.text.rules.IPartitionTokenScanner;
|
||||
import org.eclipse.jface.text.rules.RuleBasedPartitioner;
|
||||
import org.eclipse.jface.text.rules.RuleBasedScanner;
|
||||
import org.eclipse.jface.util.IPropertyChangeListener;
|
||||
import org.eclipse.jface.util.PropertyChangeEvent;
|
||||
|
|
|
@ -45,7 +45,7 @@ public class MakeView extends ViewPart {
|
|||
* Handles double clicks in viewer.
|
||||
* Opens editor if file double-clicked.
|
||||
*/
|
||||
private void handleDoubleClick(DoubleClickEvent event) {
|
||||
protected void handleDoubleClick(DoubleClickEvent event) {
|
||||
IStructuredSelection s = (IStructuredSelection)event.getSelection();
|
||||
Object element = s.getFirstElement();
|
||||
//System.out.println ("Double click on " + element);
|
||||
|
@ -62,7 +62,7 @@ public class MakeView extends ViewPart {
|
|||
/**
|
||||
* called to create the context menu of the outline
|
||||
*/
|
||||
private void contextMenuAboutToShow(IMenuManager menu) {
|
||||
protected void contextMenuAboutToShow(IMenuManager menu) {
|
||||
IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
|
||||
Object element = selection.getFirstElement ();
|
||||
if (element instanceof MakeTarget) {
|
||||
|
|
|
@ -132,7 +132,7 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
|
||||
};
|
||||
|
||||
private final String[][] fListModel= new String[][] {
|
||||
protected final String[][] fListModel= new String[][] {
|
||||
{ "Multi-line comment", ICColorConstants.C_MULTI_LINE_COMMENT },
|
||||
{ "Single-line comment", ICColorConstants.C_SINGLE_LINE_COMMENT },
|
||||
{ "Keywords", ICColorConstants.C_KEYWORD },
|
||||
|
@ -141,7 +141,7 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
{ "Others", ICColorConstants.C_DEFAULT }
|
||||
};
|
||||
|
||||
private final String[][] fAppearanceColorListModel= new String[][] {
|
||||
protected final String[][] fAppearanceColorListModel= new String[][] {
|
||||
{"Line number color", CEditor.LINE_NUMBER_COLOR}, //$NON-NLS-1$
|
||||
{"Matching bracket color", CEditor.MATCHING_BRACKETS_COLOR}, //$NON-NLS-1$
|
||||
{"Current line highlight color", CEditor.CURRENT_LINE_COLOR}, //$NON-NLS-1$
|
||||
|
@ -150,10 +150,10 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
{"Linked position color", CEditor.LINKED_POSITION_COLOR}, //$NON-NLS-1$
|
||||
};
|
||||
|
||||
private OverlayPreferenceStore fOverlayStore;
|
||||
protected OverlayPreferenceStore fOverlayStore;
|
||||
private CTextTools fCTextTools;
|
||||
|
||||
private Map fColorButtons= new HashMap();
|
||||
protected Map fColorButtons= new HashMap();
|
||||
private SelectionListener fColorButtonListener= new SelectionListener() {
|
||||
public void widgetDefaultSelected(SelectionEvent e) {
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
}
|
||||
};
|
||||
|
||||
private Map fCheckBoxes= new HashMap();
|
||||
protected Map fCheckBoxes= new HashMap();
|
||||
private SelectionListener fCheckBoxListener= new SelectionListener() {
|
||||
public void widgetDefaultSelected(SelectionEvent e) {
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
}
|
||||
};
|
||||
|
||||
private Map fTextFields= new HashMap();
|
||||
protected Map fTextFields= new HashMap();
|
||||
private ModifyListener fTextFieldListener= new ModifyListener() {
|
||||
public void modifyText(ModifyEvent e) {
|
||||
Text text= (Text) e.widget;
|
||||
|
@ -182,18 +182,18 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
};
|
||||
|
||||
private WorkbenchChainedTextFontFieldEditor fFontEditor;
|
||||
private List fList;
|
||||
private ColorEditor fForegroundColorEditor;
|
||||
private ColorEditor fBackgroundColorEditor;
|
||||
protected List fList;
|
||||
protected ColorEditor fForegroundColorEditor;
|
||||
protected ColorEditor fBackgroundColorEditor;
|
||||
private Button fBackgroundDefaultRadioButton;
|
||||
private Button fBackgroundCustomRadioButton;
|
||||
private Button fBackgroundColorButton;
|
||||
private Button fBoldCheckBox;
|
||||
private SourceViewer fPreviewViewer;
|
||||
protected Button fBackgroundCustomRadioButton;
|
||||
protected Button fBackgroundColorButton;
|
||||
protected Button fBoldCheckBox;
|
||||
protected SourceViewer fPreviewViewer;
|
||||
|
||||
private List fAppearanceColorList;
|
||||
protected List fAppearanceColorList;
|
||||
private ColorEditor fSyntaxForegroundColorEditor;
|
||||
private ColorEditor fAppearanceForegroundColorEditor;
|
||||
protected ColorEditor fAppearanceForegroundColorEditor;
|
||||
|
||||
public CEditorPreferencePage() {
|
||||
setDescription(CPlugin.getResourceString("CEditorPreferencePage.description"));
|
||||
|
@ -296,7 +296,7 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
//WorkbenchHelp.setHelp(getControl(), ICHelpContextIds.JAVA_EDITOR_PREFERENCE_PAGE);
|
||||
}
|
||||
|
||||
private void handleListSelection() {
|
||||
protected void handleListSelection() {
|
||||
int i= fList.getSelectionIndex();
|
||||
String key= fListModel[i][1];
|
||||
RGB rgb= PreferenceConverter.getColor(fOverlayStore, key);
|
||||
|
@ -495,7 +495,7 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
*
|
||||
* @param viewer the viewer to be initialized
|
||||
*/
|
||||
private void initializeViewerColors(ISourceViewer viewer) {
|
||||
protected void initializeViewerColors(ISourceViewer viewer) {
|
||||
|
||||
IPreferenceStore store= fOverlayStore;
|
||||
if (store != null) {
|
||||
|
@ -538,7 +538,7 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
}
|
||||
|
||||
// sets enabled flag for a control and all its sub-tree
|
||||
private static void setEnabled(Control control, boolean enable) {
|
||||
protected static void setEnabled(Control control, boolean enable) {
|
||||
control.setEnabled(enable);
|
||||
if (control instanceof Composite) {
|
||||
Composite composite= (Composite) control;
|
||||
|
@ -560,15 +560,15 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
private Control fBracketHighlightColor;
|
||||
private Button fLineHighlightButton;
|
||||
private Control fLineHighlightColor;
|
||||
private Button fPrintMarginButton;
|
||||
private Control fPrintMarginColor;
|
||||
private Control fPrintMarginColumn;
|
||||
protected Button fPrintMarginButton;
|
||||
protected Control fPrintMarginColor;
|
||||
protected Control fPrintMarginColumn;
|
||||
private Button fProblemIndicationButton;
|
||||
private Control fProblemIndicationColor;
|
||||
private Control fFindScopeColor;
|
||||
private Control fLinkedPositionColor;
|
||||
|
||||
private void handleAppearanceColorListSelection() {
|
||||
protected void handleAppearanceColorListSelection() {
|
||||
int i= fAppearanceColorList.getSelectionIndex();
|
||||
String key= fAppearanceColorListModel[i][1];
|
||||
RGB rgb= PreferenceConverter.getColor(fOverlayStore, key);
|
||||
|
@ -995,7 +995,7 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
return buffer.toString();
|
||||
}
|
||||
|
||||
private void numberFieldChanged(Text textControl) {
|
||||
protected void numberFieldChanged(Text textControl) {
|
||||
String number= textControl.getText();
|
||||
IStatus status= validatePositiveNumber(number);
|
||||
if (!status.matches(IStatus.ERROR))
|
||||
|
|
|
@ -5,25 +5,9 @@ package org.eclipse.cdt.internal.ui.preferences;
|
|||
* All Rights Reserved.
|
||||
*/
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.DirectoryDialog;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.eclipse.core.runtime.QualifiedName;
|
||||
|
||||
import org.eclipse.jface.dialogs.ErrorDialog;
|
||||
|
||||
import org.eclipse.ui.dialogs.PropertyPage;
|
||||
import org.eclipse.ui.help.DialogPageContextComputer;
|
||||
import org.eclipse.ui.help.WorkbenchHelp;
|
||||
|
||||
import org.eclipse.cdt.core.CProjectNature;
|
||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
||||
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
|
||||
import org.eclipse.cdt.internal.ui.dialogs.StatusInfo;
|
||||
import org.eclipse.cdt.internal.ui.dialogs.StatusTool;
|
||||
import org.eclipse.cdt.internal.ui.wizards.dialogfields.DialogField;
|
||||
|
@ -32,10 +16,20 @@ import org.eclipse.cdt.internal.ui.wizards.dialogfields.IStringButtonAdapter;
|
|||
import org.eclipse.cdt.internal.ui.wizards.dialogfields.StringButtonDialogField;
|
||||
import org.eclipse.cdt.internal.ui.wizards.dialogfields.StringDialogField;
|
||||
import org.eclipse.cdt.internal.ui.wizards.swt.MGridLayout;
|
||||
|
||||
import org.eclipse.cdt.core.CProjectNature;
|
||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
||||
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.eclipse.core.runtime.QualifiedName;
|
||||
import org.eclipse.jface.dialogs.ErrorDialog;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.DirectoryDialog;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.ui.dialogs.PropertyPage;
|
||||
import org.eclipse.ui.help.WorkbenchHelp;
|
||||
public class CLaunchingPropertyPage extends PropertyPage {
|
||||
|
||||
private static final String PAGE_NAME= "CLaunchingPropertyPage";
|
||||
|
@ -47,7 +41,7 @@ public class CLaunchingPropertyPage extends PropertyPage {
|
|||
private static final String ERROR_WORKINGDIR_NOTEXISTS= PAGE_NAME + ".error.WorkingDirNotExists";
|
||||
|
||||
private StringDialogField fArgumentField;
|
||||
private StringButtonDialogField fWorkingDirField;
|
||||
protected StringButtonDialogField fWorkingDirField;
|
||||
|
||||
private StatusInfo fWorkingDirStatus;
|
||||
|
||||
|
@ -174,7 +168,7 @@ public class CLaunchingPropertyPage extends PropertyPage {
|
|||
}
|
||||
}
|
||||
|
||||
private void doFieldChanged(DialogField field) {
|
||||
protected void doFieldChanged(DialogField field) {
|
||||
if (field == fWorkingDirField) {
|
||||
updateWorkingDirStatus();
|
||||
}
|
||||
|
@ -198,7 +192,7 @@ public class CLaunchingPropertyPage extends PropertyPage {
|
|||
return (IFile)getElement();
|
||||
}
|
||||
|
||||
private String chooseFolder(String initPath) {
|
||||
protected String chooseFolder(String initPath) {
|
||||
DirectoryDialog dialog= new DirectoryDialog(fShell, 0);
|
||||
dialog.setFilterPath(initPath);
|
||||
String res= dialog.open();
|
||||
|
|
|
@ -5,26 +5,21 @@ package org.eclipse.cdt.internal.ui.preferences;
|
|||
* All Rights Reserved.
|
||||
*/
|
||||
|
||||
import org.eclipse.swt.graphics.Font;
|
||||
import org.eclipse.swt.graphics.FontData;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
|
||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
||||
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
|
||||
import org.eclipse.jface.preference.BooleanFieldEditor;
|
||||
import org.eclipse.jface.preference.FieldEditorPreferencePage;
|
||||
import org.eclipse.jface.preference.FontFieldEditor;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.jface.preference.PreferenceConverter;
|
||||
import org.eclipse.jface.resource.JFaceResources;
|
||||
|
||||
import org.eclipse.swt.graphics.Font;
|
||||
import org.eclipse.swt.graphics.FontData;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.ui.IWorkbench;
|
||||
import org.eclipse.ui.IWorkbenchPreferencePage;
|
||||
import org.eclipse.ui.help.DialogPageContextComputer;
|
||||
import org.eclipse.ui.help.WorkbenchHelp;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
||||
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
|
||||
|
||||
/**
|
||||
* The page for setting c plugin preferences.
|
||||
*/
|
||||
|
|
|
@ -18,14 +18,12 @@ import org.eclipse.core.runtime.IStatus;
|
|||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.layout.FillLayout;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.TabFolder;
|
||||
import org.eclipse.swt.widgets.TabItem;
|
||||
import org.eclipse.ui.dialogs.PropertyPage;
|
||||
import org.eclipse.ui.help.DialogPageContextComputer;
|
||||
import org.eclipse.ui.help.WorkbenchHelp;
|
||||
|
||||
public class CProjectPropertyPage extends PropertyPage implements IStatusChangeListener, IValidation {
|
||||
|
|
|
@ -30,10 +30,10 @@ import org.eclipse.jface.resource.JFaceResources;
|
|||
public class ColorEditor {
|
||||
|
||||
private Point fExtent;
|
||||
private Image fImage;
|
||||
private RGB fColorValue;
|
||||
private Color fColor;
|
||||
private Button fButton;
|
||||
protected Image fImage;
|
||||
protected RGB fColorValue;
|
||||
protected Color fColor;
|
||||
protected Button fButton;
|
||||
|
||||
public ColorEditor(Composite parent) {
|
||||
|
||||
|
|
|
@ -191,19 +191,19 @@ public class EditTemplateDialog extends StatusDialog {
|
|||
|
||||
private final Template fTemplate;
|
||||
|
||||
private Text fNameText;
|
||||
protected Text fNameText;
|
||||
private Text fDescriptionText;
|
||||
private Combo fContextCombo;
|
||||
private SourceViewer fPatternEditor;
|
||||
protected Combo fContextCombo;
|
||||
protected SourceViewer fPatternEditor;
|
||||
private Button fInsertVariableButton;
|
||||
|
||||
private TemplateTranslator fTranslator= new TemplateTranslator();
|
||||
private boolean fSuppressError= true; // #4354
|
||||
protected TemplateTranslator fTranslator= new TemplateTranslator();
|
||||
protected boolean fSuppressError= true; // #4354
|
||||
private Map fGlobalActions= new HashMap(10);
|
||||
private List fSelectionActions = new ArrayList(3);
|
||||
private Vector fContextTypes= new Vector();
|
||||
|
||||
private final TemplateVariableProcessor fProcessor= new TemplateVariableProcessor();
|
||||
protected final TemplateVariableProcessor fProcessor= new TemplateVariableProcessor();
|
||||
|
||||
public EditTemplateDialog(Shell parent, Template template, boolean edit) {
|
||||
super(parent);
|
||||
|
@ -382,7 +382,7 @@ public class EditTemplateDialog extends StatusDialog {
|
|||
return viewer;
|
||||
}
|
||||
|
||||
private void handleKeyPressed(KeyEvent event) {
|
||||
protected void handleKeyPressed(KeyEvent event) {
|
||||
if (event.stateMask != SWT.CTRL)
|
||||
return;
|
||||
|
||||
|
@ -398,7 +398,7 @@ public class EditTemplateDialog extends StatusDialog {
|
|||
}
|
||||
}
|
||||
|
||||
private void handleVerifyKeyPressed(VerifyEvent event) {
|
||||
protected void handleVerifyKeyPressed(VerifyEvent event) {
|
||||
if (!event.doit)
|
||||
return;
|
||||
|
||||
|
@ -462,7 +462,7 @@ public class EditTemplateDialog extends StatusDialog {
|
|||
text.setMenu(menu);
|
||||
}
|
||||
|
||||
private void fillContextMenu(IMenuManager menu) {
|
||||
protected void fillContextMenu(IMenuManager menu) {
|
||||
menu.add(new GroupMarker(ITextEditorActionConstants.GROUP_UNDO));
|
||||
menu.appendToGroup(ITextEditorActionConstants.GROUP_UNDO, (IAction) fGlobalActions.get(ITextEditorActionConstants.UNDO));
|
||||
|
||||
|
@ -513,7 +513,7 @@ public class EditTemplateDialog extends StatusDialog {
|
|||
super.okPressed();
|
||||
}
|
||||
|
||||
private void updateButtons() {
|
||||
protected void updateButtons() {
|
||||
boolean valid= fNameText.getText().trim().length() != 0;
|
||||
|
||||
StatusInfo status= new StatusInfo();
|
||||
|
|
|
@ -17,7 +17,7 @@ public class OverlayPreferenceStore implements IPreferenceStore {
|
|||
|
||||
|
||||
public static final class TypeDescriptor {
|
||||
private TypeDescriptor() {
|
||||
protected TypeDescriptor() {
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -52,8 +52,8 @@ public class OverlayPreferenceStore implements IPreferenceStore {
|
|||
};
|
||||
|
||||
|
||||
private IPreferenceStore fParent;
|
||||
private IPreferenceStore fStore;
|
||||
protected IPreferenceStore fParent;
|
||||
protected IPreferenceStore fStore;
|
||||
private OverlayKey[] fOverlayKeys;
|
||||
|
||||
private PropertyListener fPropertyListener;
|
||||
|
@ -65,7 +65,7 @@ public class OverlayPreferenceStore implements IPreferenceStore {
|
|||
fStore= new PreferenceStore();
|
||||
}
|
||||
|
||||
private OverlayKey findOverlayKey(String key) {
|
||||
protected OverlayKey findOverlayKey(String key) {
|
||||
for (int i= 0; i < fOverlayKeys.length; i++) {
|
||||
if (fOverlayKeys[i].fKey.equals(key))
|
||||
return fOverlayKeys[i];
|
||||
|
@ -77,7 +77,7 @@ public class OverlayPreferenceStore implements IPreferenceStore {
|
|||
return (findOverlayKey(key) != null);
|
||||
}
|
||||
|
||||
private void propagateProperty(IPreferenceStore orgin, OverlayKey key, IPreferenceStore target) {
|
||||
protected void propagateProperty(IPreferenceStore orgin, OverlayKey key, IPreferenceStore target) {
|
||||
|
||||
if (orgin.isDefault(key.fKey)) {
|
||||
if (!target.isDefault(key.fKey))
|
||||
|
|
|
@ -5,6 +5,11 @@ package org.eclipse.cdt.internal.ui.preferences;
|
|||
* All Rights Reserved.
|
||||
*/
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.cdt.internal.corext.template.ContextType;
|
||||
import org.eclipse.cdt.internal.corext.template.ContextTypeRegistry;
|
||||
import org.eclipse.cdt.internal.corext.template.Template;
|
||||
|
@ -18,27 +23,7 @@ import org.eclipse.cdt.internal.ui.text.CTextTools;
|
|||
import org.eclipse.cdt.internal.ui.text.template.TemplateContentProvider;
|
||||
import org.eclipse.cdt.internal.ui.text.template.TemplateLabelProvider;
|
||||
import org.eclipse.cdt.internal.ui.util.SWTUtil;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Font;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Button;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.Event;
|
||||
import org.eclipse.swt.widgets.FileDialog;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.Listener;
|
||||
import org.eclipse.swt.widgets.Table;
|
||||
import org.eclipse.swt.widgets.TableColumn;
|
||||
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
|
||||
import org.eclipse.jface.dialogs.ErrorDialog;
|
||||
import org.eclipse.jface.dialogs.MessageDialog;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
|
@ -59,10 +44,21 @@ import org.eclipse.jface.viewers.StructuredSelection;
|
|||
import org.eclipse.jface.viewers.TableLayout;
|
||||
import org.eclipse.jface.viewers.Viewer;
|
||||
import org.eclipse.jface.viewers.ViewerSorter;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Font;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Button;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.Event;
|
||||
import org.eclipse.swt.widgets.FileDialog;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.Listener;
|
||||
import org.eclipse.swt.widgets.Table;
|
||||
import org.eclipse.swt.widgets.TableColumn;
|
||||
import org.eclipse.ui.IWorkbench;
|
||||
import org.eclipse.ui.IWorkbenchPreferencePage;
|
||||
import org.eclipse.ui.help.DialogPageContextComputer;
|
||||
import org.eclipse.ui.help.WorkbenchHelp;
|
||||
|
||||
|
||||
|
@ -331,7 +327,7 @@ public class TemplatePreferencePage extends PreferencePage implements IWorkbench
|
|||
return data;
|
||||
}
|
||||
|
||||
private void selectionChanged1() {
|
||||
protected void selectionChanged1() {
|
||||
IStructuredSelection selection= (IStructuredSelection) fTableViewer.getSelection();
|
||||
|
||||
if (selection.size() == 1) {
|
||||
|
@ -355,7 +351,7 @@ public class TemplatePreferencePage extends PreferencePage implements IWorkbench
|
|||
fDisableAllButton.setEnabled(itemCount > 0);
|
||||
}
|
||||
|
||||
private void add() {
|
||||
protected void add() {
|
||||
|
||||
Template template= new Template();
|
||||
|
||||
|
@ -380,7 +376,7 @@ public class TemplatePreferencePage extends PreferencePage implements IWorkbench
|
|||
}
|
||||
}
|
||||
|
||||
private void edit() {
|
||||
protected void edit() {
|
||||
IStructuredSelection selection= (IStructuredSelection) fTableViewer.getSelection();
|
||||
|
||||
Object[] objects= selection.toArray();
|
||||
|
@ -416,7 +412,7 @@ public class TemplatePreferencePage extends PreferencePage implements IWorkbench
|
|||
}
|
||||
}
|
||||
|
||||
private void import_() {
|
||||
protected void import_() {
|
||||
FileDialog dialog= new FileDialog(getShell());
|
||||
dialog.setText(TemplateMessages.getString("TemplatePreferencePage.import.title")); //$NON-NLS-1$
|
||||
dialog.setFilterExtensions(new String[] {TemplateMessages.getString("TemplatePreferencePage.import.extension")}); //$NON-NLS-1$
|
||||
|
@ -437,11 +433,11 @@ public class TemplatePreferencePage extends PreferencePage implements IWorkbench
|
|||
}
|
||||
}
|
||||
|
||||
private void exportAll() {
|
||||
protected void exportAll() {
|
||||
export(fTemplates);
|
||||
}
|
||||
|
||||
private void export() {
|
||||
protected void export() {
|
||||
IStructuredSelection selection= (IStructuredSelection) fTableViewer.getSelection();
|
||||
Object[] templates= selection.toArray();
|
||||
|
||||
|
@ -480,7 +476,7 @@ public class TemplatePreferencePage extends PreferencePage implements IWorkbench
|
|||
TemplateMessages.getFormattedString("TemplatePreferencePage.export.exists.message", file.getAbsolutePath()));
|
||||
}
|
||||
|
||||
private void remove() {
|
||||
protected void remove() {
|
||||
IStructuredSelection selection= (IStructuredSelection) fTableViewer.getSelection();
|
||||
|
||||
Iterator elements= selection.iterator();
|
||||
|
@ -492,7 +488,7 @@ public class TemplatePreferencePage extends PreferencePage implements IWorkbench
|
|||
fTableViewer.refresh();
|
||||
}
|
||||
|
||||
private void enableAll(boolean enable) {
|
||||
protected void enableAll(boolean enable) {
|
||||
Template[] templates= fTemplates.getTemplates();
|
||||
for (int i= 0; i != templates.length; i++)
|
||||
templates[i].setEnabled(enable);
|
||||
|
|
|
@ -6,22 +6,16 @@ package org.eclipse.cdt.internal.ui.text;
|
|||
*/
|
||||
|
||||
|
||||
import org.eclipse.cdt.internal.ui.text.util.CWordDetector;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import java.util.Map;
|
||||
import org.eclipse.cdt.internal.ui.text.util.CWordDetector;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.jface.text.rules.ICharacterScanner;
|
||||
import org.eclipse.jface.text.rules.IRule;
|
||||
import org.eclipse.jface.text.rules.IToken;
|
||||
import org.eclipse.jface.text.rules.IWordDetector;
|
||||
import org.eclipse.jface.text.rules.PatternRule;
|
||||
import org.eclipse.jface.text.rules.SingleLineRule;
|
||||
import org.eclipse.jface.text.rules.Token;
|
||||
import org.eclipse.jface.text.rules.WordRule;
|
||||
import org.eclipse.jface.util.Assert;
|
||||
import org.eclipse.jface.util.PropertyChangeEvent;
|
||||
|
||||
|
||||
|
|
|
@ -7,6 +7,10 @@ package org.eclipse.cdt.internal.ui.text;
|
|||
import java.util.HashMap;
|
||||
import java.util.Vector;
|
||||
|
||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
||||
import org.eclipse.cdt.internal.ui.editor.CEditor;
|
||||
import org.eclipse.cdt.internal.ui.editor.CEditorTextHoverDispatcher;
|
||||
import org.eclipse.cdt.ui.ICDTConstants;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IConfigurationElement;
|
||||
import org.eclipse.core.runtime.IExtension;
|
||||
|
@ -29,18 +33,12 @@ import org.eclipse.jface.text.reconciler.IReconciler;
|
|||
import org.eclipse.jface.text.reconciler.Reconciler;
|
||||
import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
|
||||
import org.eclipse.jface.text.rules.DefaultPartitioner;
|
||||
import org.eclipse.jface.text.rules.RuleBasedDamagerRepairer;
|
||||
import org.eclipse.jface.text.rules.RuleBasedScanner;
|
||||
import org.eclipse.jface.text.source.IAnnotationHover;
|
||||
import org.eclipse.jface.text.source.ISourceViewer;
|
||||
import org.eclipse.jface.text.source.SourceViewerConfiguration;
|
||||
import org.eclipse.ui.texteditor.ITextEditor;
|
||||
|
||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
||||
import org.eclipse.cdt.internal.ui.editor.CEditor;
|
||||
import org.eclipse.cdt.internal.ui.editor.CEditorTextHoverDispatcher;
|
||||
import org.eclipse.cdt.ui.ICDTConstants;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -27,7 +27,7 @@ public class CColorManager implements IColorManager, IColorManagerExtension {
|
|||
public CColorManager() {
|
||||
}
|
||||
|
||||
private void dispose(Display display) {
|
||||
protected void dispose(Display display) {
|
||||
Map colorTable= (Map) fDisplayTable.get(display);
|
||||
if (colorTable != null) {
|
||||
Iterator e= colorTable.values().iterator();
|
||||
|
|
|
@ -26,7 +26,7 @@ import org.eclipse.jface.viewers.TreeViewer;
|
|||
*/
|
||||
public class ProblemTreeViewer extends TreeViewer implements IProblemChangedListener {
|
||||
|
||||
private ProblemItemMapper fProblemItemMapper;
|
||||
protected ProblemItemMapper fProblemItemMapper;
|
||||
|
||||
/*
|
||||
* @see TreeViewer#TreeViewer(Composite)
|
||||
|
|
|
@ -34,7 +34,8 @@ public class StringDialogField extends DialogField {
|
|||
|
||||
return new Control[] { label, text };
|
||||
}
|
||||
private void doModifyText(ModifyEvent e) {
|
||||
|
||||
protected void doModifyText(ModifyEvent e) {
|
||||
if (isOkToUse(fTextControl)) {
|
||||
fText= fTextControl.getText();
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ import org.eclipse.ui.internal.IHelpContextIds;
|
|||
*/
|
||||
public class CProjectWizardPage extends WizardPage {
|
||||
|
||||
private boolean useDefaults = true;
|
||||
protected boolean useDefaults = true;
|
||||
|
||||
// initial value stores
|
||||
private String initialProjectFieldValue;
|
||||
|
@ -57,9 +57,9 @@ public class CProjectWizardPage extends WizardPage {
|
|||
|
||||
// widgets
|
||||
private Text projectNameField;
|
||||
private Text locationPathField;
|
||||
private Label locationLabel;
|
||||
private Button browseButton;
|
||||
protected Text locationPathField;
|
||||
protected Label locationLabel;
|
||||
protected Button browseButton;
|
||||
|
||||
private Listener nameModifyListener = new Listener() {
|
||||
public void handleEvent(Event e) {
|
||||
|
@ -250,7 +250,7 @@ public class CProjectWizardPage extends WizardPage {
|
|||
/**
|
||||
* Open an appropriate directory browser
|
||||
*/
|
||||
private void handleLocationBrowseButtonPressed() {
|
||||
protected void handleLocationBrowseButtonPressed() {
|
||||
DirectoryDialog dialog = new DirectoryDialog(locationPathField.getShell());
|
||||
dialog.setMessage(CPlugin.getResourceString("CProjectWizardPage.directoryLabel")); //$NON-NLS-1$
|
||||
|
||||
|
@ -280,7 +280,7 @@ public class CProjectWizardPage extends WizardPage {
|
|||
/**
|
||||
* Set the location to the default location if we are set to useDefaults.
|
||||
*/
|
||||
private void setLocationForSelection() {
|
||||
protected void setLocationForSelection() {
|
||||
if (useDefaults) {
|
||||
IPath defaultPath = Platform.getLocation().append(projectNameField.getText());
|
||||
locationPathField.setText(defaultPath.toOSString());
|
||||
|
@ -294,7 +294,7 @@ public class CProjectWizardPage extends WizardPage {
|
|||
* @return <code>true</code> if all controls are valid, and
|
||||
* <code>false</code> if at least one is invalid
|
||||
*/
|
||||
private boolean validatePage() {
|
||||
protected boolean validatePage() {
|
||||
IWorkspace workspace = ResourcesPlugin.getWorkspace();
|
||||
|
||||
String projectFieldContents = projectNameField.getText();
|
||||
|
|
|
@ -50,9 +50,9 @@ public class SettingsBlock implements IWizardTab {
|
|||
private static final String KEEP_ARG = "keep"; //$NON-NLS-1$
|
||||
private static final String STOP_ARG = "stop"; //$NON-NLS-1$
|
||||
|
||||
private RadioButtonsArea radioButtons;
|
||||
private Button defButton;
|
||||
private Text cmdText;
|
||||
protected RadioButtonsArea radioButtons;
|
||||
protected Button defButton;
|
||||
protected Text cmdText;
|
||||
|
||||
private boolean stopOnError;
|
||||
private boolean useDefaultBuildCmd;
|
||||
|
|
|
@ -73,7 +73,7 @@ public abstract class ConvertProjectWizardPage
|
|||
protected Button deselectAllButton;
|
||||
|
||||
// We only need to calculate this once per instantiation of this wizard
|
||||
private Object[] listItems = null;
|
||||
protected Object[] listItems = null;
|
||||
|
||||
/**
|
||||
* Constructor for ConvertProjectWizardPage.
|
||||
|
@ -258,7 +258,7 @@ public abstract class ConvertProjectWizardPage
|
|||
* dependent on what is selected
|
||||
*/
|
||||
|
||||
private void updateSelectionButtons() {
|
||||
protected void updateSelectionButtons() {
|
||||
|
||||
// update select and deselect buttons as required
|
||||
Object[] checkedObjects = tableViewer.getCheckedElements();
|
||||
|
|
|
@ -48,7 +48,7 @@ public class RadioButtonsArea extends Composite {
|
|||
* The radio buttons, or <code>null</code> if none
|
||||
* (before creation and after disposal).
|
||||
*/
|
||||
private Button[] radioButtons;
|
||||
protected Button[] radioButtons;
|
||||
|
||||
|
||||
public RadioButtonsArea(Composite parent, String labelText, int numColumns, String[][] labelAndValues) {
|
||||
|
@ -82,7 +82,7 @@ public class RadioButtonsArea extends Composite {
|
|||
return true;
|
||||
}
|
||||
|
||||
private void fireSelectionEvent(SelectionEvent event) {
|
||||
protected void fireSelectionEvent(SelectionEvent event) {
|
||||
for(Iterator i = externalListeners.iterator(); i.hasNext(); ) {
|
||||
SelectionListener s = (SelectionListener)i.next();
|
||||
s.widgetSelected(event);
|
||||
|
|
Loading…
Add table
Reference in a new issue