Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorMarkus Schorn2006-05-03 08:50:59 +0000
committerMarkus Schorn2006-05-03 08:50:59 +0000
commit159945250efc28ad3c5d2be1be2df38a21b9f252 (patch)
tree0dbd2065a652b287ed53aa7ee86f79b7200a6762 /build
parent0b807e8a4448eb94bffb30dac2931432c21d0371 (diff)
downloadorg.eclipse.cdt-159945250efc28ad3c5d2be1be2df38a21b9f252.tar.gz
org.eclipse.cdt-159945250efc28ad3c5d2be1be2df38a21b9f252.tar.xz
org.eclipse.cdt-159945250efc28ad3c5d2be1be2df38a21b9f252.zip
Adds default preference pages for the C- and Makefile Editor; Toni's patch for bug 138212
Diffstat (limited to 'build')
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileEditor.java54
1 files changed, 25 insertions, 29 deletions
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileEditor.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileEditor.java
index 5c7230e9054..135ab69314b 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileEditor.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileEditor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2005 QNX Software Systems and others.
+ * Copyright (c) 2000, 2006 QNX Software 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:
* QNX Software Systems - Initial API and implementation
+ * Anton Leherbauer, Wind River Systems, Inc.
*******************************************************************************/
package org.eclipse.cdt.make.internal.ui.editor;
@@ -17,40 +18,21 @@ import org.eclipse.cdt.make.internal.ui.MakeUIPlugin;
import org.eclipse.cdt.make.internal.ui.preferences.MakefileEditorPreferenceConstants;
import org.eclipse.cdt.make.internal.ui.text.makefile.MakefileWordDetector;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.ListenerList;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.FindReplaceDocumentAdapter;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextOperationTarget;
-import org.eclipse.jface.text.ITextViewerExtension;
+import org.eclipse.jface.text.*;
import org.eclipse.jface.text.rules.IWordDetector;
-import org.eclipse.jface.text.source.IOverviewRuler;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.text.source.IVerticalRuler;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-import org.eclipse.jface.text.source.projection.ProjectionAnnotationModel;
-import org.eclipse.jface.text.source.projection.ProjectionSupport;
-import org.eclipse.jface.text.source.projection.ProjectionViewer;
-import org.eclipse.jface.util.ListenerList;
+import org.eclipse.jface.text.source.*;
+import org.eclipse.jface.text.source.projection.*;
import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.*;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IPartService;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.*;
import org.eclipse.ui.editors.text.EditorsUI;
import org.eclipse.ui.editors.text.TextEditor;
-import org.eclipse.ui.texteditor.ChainedPreferenceStore;
-import org.eclipse.ui.texteditor.DefaultRangeIndicator;
-import org.eclipse.ui.texteditor.ITextEditorActionConstants;
-import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
-import org.eclipse.ui.texteditor.TextOperationAction;
+import org.eclipse.ui.texteditor.*;
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
public class MakefileEditor extends TextEditor implements ISelectionChangedListener, IReconcilingParticipant {
@@ -67,7 +49,7 @@ public class MakefileEditor extends TextEditor implements ISelectionChangedListe
* Reconciling listeners.
* @since 3.0
*/
- private ListenerList fReconcilingListeners= new ListenerList();
+ private ListenerList fReconcilingListeners= new ListenerList(ListenerList.IDENTITY);
/**
* Adapted source viewer for CEditor
@@ -163,7 +145,7 @@ public class MakefileEditor extends TextEditor implements ISelectionChangedListe
projectionViewer.doOperation(ProjectionViewer.TOGGLE);
}
- ProjectionAnnotationModel model= (ProjectionAnnotationModel) getAdapter(ProjectionAnnotationModel.class);
+// ProjectionAnnotationModel model= (ProjectionAnnotationModel) getAdapter(ProjectionAnnotationModel.class);
fProjectionMakefileUpdater= new ProjectionMakefileUpdater();
if (fProjectionMakefileUpdater != null) {
@@ -433,4 +415,18 @@ public class MakefileEditor extends TextEditor implements ISelectionChangedListe
super.handlePreferenceStoreChanged(event);
}
+
+ /*
+ * @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#collectContextMenuPreferencePages()
+ */
+ protected String[] collectContextMenuPreferencePages() {
+ // Add Makefile Editor relevant pages
+ String[] parentPrefPageIds = super.collectContextMenuPreferencePages();
+ String[] prefPageIds = new String[parentPrefPageIds.length + 2];
+ int nIds = 0;
+ prefPageIds[nIds++] = "org.eclipse.cdt.make.ui.preferences.MakeFileEditorPreferencePage"; //$NON-NLS-1$
+ prefPageIds[nIds++] = "org.eclipse.cdt.make.ui.preferences.MakefileSettingPreferencePage"; //$NON-NLS-1$
+ System.arraycopy(parentPrefPageIds, 0, prefPageIds, nIds, parentPrefPageIds.length);
+ return prefPageIds;
+ }
}

Back to the top