Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 102058 Details for
Bug 162558
[bridge] C/C++ via CDT
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch 4 for CDT removal of unused preference wizards that no longer build
cdt.mylyn.ui-3.0.patch4 (text/plain), 17.59 KB, created by
Jeff Johnston
on 2008-05-26 17:42:37 EDT
(
hide
)
Description:
Patch 4 for CDT removal of unused preference wizards that no longer build
Filename:
MIME Type:
Creator:
Jeff Johnston
Created:
2008-05-26 17:42:37 EDT
Size:
17.59 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.cdt.mylyn.ui >Index: src/org/eclipse/cdt/mylyn/internal/ui/CDTUIBridgePlugin.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/mylyn/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/CDTUIBridgePlugin.java,v >retrieving revision 1.1 >diff -u -r1.1 CDTUIBridgePlugin.java >--- src/org/eclipse/cdt/mylyn/internal/ui/CDTUIBridgePlugin.java 21 Apr 2008 16:40:17 -0000 1.1 >+++ src/org/eclipse/cdt/mylyn/internal/ui/CDTUIBridgePlugin.java 26 May 2008 21:34:04 -0000 >@@ -17,12 +17,10 @@ > import org.eclipse.cdt.core.model.CoreModel; > import org.eclipse.cdt.internal.ui.editor.CEditor; > import org.eclipse.cdt.mylyn.internal.ui.editor.ActiveFoldingListener; >-import org.eclipse.cdt.mylyn.internal.ui.wizards.RecommendedPreferencesWizard; > import org.eclipse.cdt.ui.CUIPlugin; > import org.eclipse.jface.resource.ImageDescriptor; >-import org.eclipse.mylyn.context.core.ContextCorePlugin; >-import org.eclipse.mylyn.internal.context.ui.AbstractContextUiPlugin; >-import org.eclipse.mylyn.monitor.ui.MonitorUiPlugin; >+import org.eclipse.mylyn.internal.context.core.ContextCorePlugin; >+import org.eclipse.mylyn.internal.monitor.ui.MonitorUiPlugin; > import org.eclipse.ui.IEditorPart; > import org.eclipse.ui.IEditorReference; > import org.eclipse.ui.IWorkbench; >@@ -36,9 +34,14 @@ > * @author Mik Kersten > * @author Jeff Johnston > */ >-public class CDTUIBridgePlugin extends AbstractContextUiPlugin { >+public class CDTUIBridgePlugin extends AbstractUIPlugin { > > public static final String PLUGIN_ID = "org.eclipse.cdt.mylyn.ui"; // $NON-NLS-1$ >+ >+ public static final String AUTO_FOLDING_ENABLED = "org.eclipse.mylyn.context.ui.editor.folding.enabled"; // $NON-NLS-1$ >+ >+ private static final String MYLYN_FIRST_RUN = "org.eclipse.mylyn.ui.first.run.0_4_9"; >+ > public static final int START_ACTIVATION_POLICY = 0x00000002; > > private static CDTUIBridgePlugin INSTANCE; >@@ -73,18 +76,17 @@ > initDefaultPrefs(); > > // NOTE: moved out of wizard and first task activation to avoid bug 194766 >- if (getPreferenceStore().getBoolean(RecommendedPreferencesWizard.MYLYN_FIRST_RUN)) { >- getPreferenceStore().setValue(RecommendedPreferencesWizard.MYLYN_FIRST_RUN, false); >+ if (getPreferenceStore().getBoolean(MYLYN_FIRST_RUN)) { >+ getPreferenceStore().setValue(MYLYN_FIRST_RUN, false); > CDTUiUtil.installContentAssist(CUIPlugin.getDefault().getPreferenceStore(), true); > } > } > >- @Override >- protected void lazyStart(IWorkbench workbench) { >+ private void lazyStart() { > ContextCorePlugin.getContextManager().addListener(landmarkMarkerManager); > cEditingMonitor = new CDTEditorMonitor(); > MonitorUiPlugin.getDefault().getSelectionMonitors().add(cEditingMonitor); >- installEditorTracker(workbench); >+ installEditorTracker(PlatformUI.getWorkbench()); > CoreModel.getDefault().addElementChangedListener(cElementChangeListener); > > getPreferenceStore().addPropertyChangeListener(problemListener); >@@ -102,11 +104,11 @@ > > private void initDefaultPrefs() { > getPreferenceStore().setDefault(InterestInducingProblemListener.PREDICTED_INTEREST_ERRORS, false); >- getPreferenceStore().setDefault(RecommendedPreferencesWizard.MYLYN_FIRST_RUN, true); >+ getPreferenceStore().setDefault(MYLYN_FIRST_RUN, true); > } > >- @Override >- protected void lazyStop() { >+ >+ private void lazyStop() { > // ContextCorePlugin.getContextManager().removeListener(typeHistoryManager); > ContextCorePlugin.getContextManager().removeListener(landmarkMarkerManager); > MonitorUiPlugin.getDefault().getSelectionMonitors().remove(cEditingMonitor); >Index: src/org/eclipse/cdt/mylyn/internal/ui/CDTEditorMonitor.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/mylyn/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/CDTEditorMonitor.java,v >retrieving revision 1.1 >diff -u -r1.1 CDTEditorMonitor.java >--- src/org/eclipse/cdt/mylyn/internal/ui/CDTEditorMonitor.java 21 Apr 2008 16:40:17 -0000 1.1 >+++ src/org/eclipse/cdt/mylyn/internal/ui/CDTEditorMonitor.java 26 May 2008 21:34:04 -0000 >@@ -16,9 +16,10 @@ > import org.eclipse.cdt.core.model.IMethod; > import org.eclipse.cdt.internal.ui.actions.SelectionConverter; > import org.eclipse.cdt.internal.ui.editor.CEditor; >+import org.eclipse.core.runtime.CoreException; > import org.eclipse.jface.viewers.ISelection; > import org.eclipse.jface.viewers.StructuredSelection; >-import org.eclipse.mylyn.monitor.core.StatusHandler; >+import org.eclipse.mylyn.commons.core.StatusHandler; > import org.eclipse.mylyn.monitor.ui.AbstractUserInteractionMonitor; > import org.eclipse.ui.IWorkbenchPart; > >@@ -44,7 +45,8 @@ > * Only public for testing > */ > @Override >- public void handleWorkbenchPartSelection(IWorkbenchPart part, ISelection selection, boolean contributeToContext) { >+ public void handleWorkbenchPartSelection(IWorkbenchPart part, >+ ISelection selection, boolean contributeToContext) { > try { > ICElement selectedElement = null; > if (selection instanceof StructuredSelection) { >@@ -55,9 +57,11 @@ > } > currentSelection = structuredSelection; > >-// Object selectedObject = structuredSelection.getFirstElement(); >- for (Iterator<?> iterator = structuredSelection.iterator(); iterator.hasNext();) { >- Object selectedObject = iterator.next(); >+ // Object selectedObject = >+ // structuredSelection.getFirstElement(); >+ for (Iterator<?> iterator = structuredSelection.iterator(); iterator >+ .hasNext();) { >+ Object selectedObject = iterator.next(); > if (selectedObject instanceof ICElement) { > ICElement checkedElement = checkIfAcceptedAndPromoteIfNecessary((ICElement) selectedObject); > if (checkedElement == null) { >@@ -67,21 +71,25 @@ > } > } > if (selectedElement != null) { >- super.handleElementSelection(part, selectedElement, contributeToContext); >+ super.handleElementSelection(part, selectedElement, >+ contributeToContext); > } > } > } else { > if (part instanceof CEditor) { > currentEditor = (CEditor) part; >- selectedElement = SelectionConverter.getElementAtOffset(currentEditor); >+ selectedElement = SelectionConverter >+ .getElementAtOffset(currentEditor); > if (selectedElement == null) > return; // nothing selected > > if (selectedElement != null) { > if (selectedElement.equals(lastSelectedElement)) { >- super.handleElementEdit(part, selectedElement, contributeToContext); >+ super.handleElementEdit(part, selectedElement, >+ contributeToContext); > } else if (!selectedElement.equals(lastSelectedElement)) { >- super.handleElementSelection(part, selectedElement, contributeToContext); >+ super.handleElementSelection(part, selectedElement, >+ contributeToContext); > } > } > >@@ -97,9 +105,8 @@ > lastSelectedElement = selectedElement; > } > } catch (CModelException e) { >- // ignore, fine to fail to resolve an element if the model is not up-to-date >- } catch (Throwable t) { >- StatusHandler.log(t, CDTUIBridgePlugin.getResourceString("MylynCDT.log.updateModelFailed")); // $NON-NLS-1$ >+ // ignore, fine to fail to resolve an element if the model is not >+ // up-to-date > } > } > >Index: src/org/eclipse/cdt/mylyn/internal/ui/wizards/RecommendedPreferencesWizardPage.java >=================================================================== >RCS file: src/org/eclipse/cdt/mylyn/internal/ui/wizards/RecommendedPreferencesWizardPage.java >diff -N src/org/eclipse/cdt/mylyn/internal/ui/wizards/RecommendedPreferencesWizardPage.java >--- src/org/eclipse/cdt/mylyn/internal/ui/wizards/RecommendedPreferencesWizardPage.java 21 Apr 2008 16:40:17 -0000 1.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,143 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2004, 2008 Mylyn project committers and others. >- * All rights reserved. This program and the accompanying materials >- * are made available under the terms of the Eclipse Public License v1.0 >- * which accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- *******************************************************************************/ >- >-package org.eclipse.cdt.mylyn.internal.ui.wizards; >- >-import org.eclipse.cdt.mylyn.internal.ui.CDTUIBridgePlugin; >-import org.eclipse.jface.resource.JFaceResources; >-import org.eclipse.jface.wizard.WizardPage; >-import org.eclipse.mylyn.internal.tasks.ui.TaskListColorsAndFonts; >-import org.eclipse.mylyn.tasks.ui.TasksUiUtil; >-import org.eclipse.swt.SWT; >-import org.eclipse.swt.events.SelectionEvent; >-import org.eclipse.swt.events.SelectionListener; >-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.Label; >-import org.eclipse.ui.forms.events.HyperlinkEvent; >-import org.eclipse.ui.forms.events.IHyperlinkListener; >-import org.eclipse.ui.forms.widgets.Hyperlink; >- >-/** >- * @author Shawn Minto >- * @author Mik Kersten >- * @author Jeff Johnston >- */ >-public class RecommendedPreferencesWizardPage extends WizardPage { >- >- private Button contentAssistButton; >- >- private Button turnOnAutoFoldingButton; >- >- private boolean autoFolding = true; >- >- private boolean openTaskList = true; >- >- protected RecommendedPreferencesWizardPage(String pageName) { >- super(pageName); >- setTitle(pageName); >- setDescription(CDTUIBridgePlugin.getResourceString("MylynCDT.wizard.description")); // $NON-NLS-1$ >- } >- >- public void createControl(Composite parent) { >- >- Composite containerComposite = new Composite(parent, SWT.NULL); >- containerComposite.setLayout(new GridLayout()); >- >- Composite buttonComposite = new Composite(containerComposite, SWT.NULL); >- GridLayout layout = new GridLayout(); >- layout.numColumns = 2; >- layout.makeColumnsEqualWidth = false; >- buttonComposite.setLayout(layout); >- >- contentAssistButton = new Button(buttonComposite, SWT.CHECK); >- GridData gd = new GridData(); >- contentAssistButton.setLayoutData(gd); >- contentAssistButton.setSelection(true); >- >- Label label = new Label(buttonComposite, SWT.NONE); >- label.setText(CDTUIBridgePlugin.getResourceString("MylynCDT.wizard.contentAssist")); // $NON-NLS-1$ >- label = new Label(buttonComposite, SWT.NONE); >- label = new Label(buttonComposite, SWT.NONE); >- label.setFont(JFaceResources.getFontRegistry().getItalic(JFaceResources.DEFAULT_FONT)); >- label.setText(CDTUIBridgePlugin.getResourceString("MylynCDT.wizard.contentAssistWarning")); // $NON-NLS-1$ >- >- gd = new GridData(); >- label.setLayoutData(gd); >- >- turnOnAutoFoldingButton = new Button(buttonComposite, SWT.CHECK); >- gd = new GridData(); >- turnOnAutoFoldingButton.setLayoutData(gd); >- turnOnAutoFoldingButton.setSelection(true); >- turnOnAutoFoldingButton.addSelectionListener(new SelectionListener() { >- >- public void widgetSelected(SelectionEvent e) { >- autoFolding = turnOnAutoFoldingButton.getSelection(); >- } >- >- public void widgetDefaultSelected(SelectionEvent e) { >- // don't care about this event >- } >- }); >- >- label = new Label(buttonComposite, SWT.NONE); >- label.setText(CDTUIBridgePlugin.getResourceString("MylynCDT.wizard.autoFolding.text")); // $NON-NLS-1$ >- gd = new GridData(); >- label.setLayoutData(gd); >- label = new Label(buttonComposite, SWT.NONE); >- label = new Label(buttonComposite, SWT.NONE); >- label.setFont(JFaceResources.getFontRegistry().getItalic(JFaceResources.DEFAULT_FONT)); >- label.setText(CDTUIBridgePlugin.getResourceString("MylynCDT.wizard.autoFolding.label")); // $NON-NLS-1$ >- >- Label spacer = new Label(buttonComposite, SWT.NONE); >- spacer.setText(" "); >- spacer = new Label(buttonComposite, SWT.NONE); >- spacer.setText(" "); >- >- Hyperlink hyperlink = new Hyperlink(containerComposite, SWT.NULL); >- hyperlink.setUnderlined(true); >- hyperlink.setForeground(TaskListColorsAndFonts.COLOR_HYPERLINK_WIDGET); >- hyperlink.setText(CDTUIBridgePlugin.getResourceString("MylynCDT.wizard.hyperLink.text")); // $NON-NLS-1$ >- >- label = new Label(containerComposite, SWT.NONE); >- label.setText(CDTUIBridgePlugin.getResourceString("MylynCDT.wizard.iconsHelp")); // $NON-NLS-1$ >- gd = new GridData(); >- label.setLayoutData(gd); >- >- hyperlink.addHyperlinkListener(new IHyperlinkListener() { >- >- public void linkActivated(HyperlinkEvent e) { >- TasksUiUtil.openUrl("http://eclipse.org/mylyn/start.php", false); // $NON-NLS-1$ >- } >- >- public void linkEntered(HyperlinkEvent e) { >- // ignore >- } >- >- public void linkExited(HyperlinkEvent e) { >- // ignore >- } >- }); >- >- setControl(containerComposite); >- } >- >- public boolean isAutoFolding() { >- return autoFolding; >- } >- >- public boolean isMylynContentAssistDefault() { >- return contentAssistButton.getSelection(); >- } >- >- public boolean isOpenTaskList() { >- return openTaskList; >- } >-} >Index: src/org/eclipse/cdt/mylyn/internal/ui/wizards/RecommendedPreferencesWizard.java >=================================================================== >RCS file: src/org/eclipse/cdt/mylyn/internal/ui/wizards/RecommendedPreferencesWizard.java >diff -N src/org/eclipse/cdt/mylyn/internal/ui/wizards/RecommendedPreferencesWizard.java >--- src/org/eclipse/cdt/mylyn/internal/ui/wizards/RecommendedPreferencesWizard.java 21 Apr 2008 16:40:17 -0000 1.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,110 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2004, 2008 Mylyn project committers and others. >- * All rights reserved. This program and the accompanying materials >- * are made available under the terms of the Eclipse Public License v1.0 >- * which accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- *******************************************************************************/ >-package org.eclipse.cdt.mylyn.internal.ui.wizards; >- >-import org.eclipse.cdt.mylyn.internal.ui.CDTUIBridgePlugin; >-import org.eclipse.cdt.mylyn.internal.ui.CDTUiUtil; >-import org.eclipse.cdt.ui.CUIPlugin; >-import org.eclipse.cdt.ui.PreferenceConstants; >-import org.eclipse.jface.preference.IPreferenceStore; >-import org.eclipse.jface.viewers.IStructuredSelection; >-import org.eclipse.jface.wizard.Wizard; >-import org.eclipse.mylyn.context.ui.ContextUiPlugin; >-import org.eclipse.mylyn.internal.context.ui.ContextUiImages; >-import org.eclipse.mylyn.internal.context.ui.ContextUiPrefContstants; >-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView; >-import org.eclipse.ui.INewWizard; >-import org.eclipse.ui.IWorkbench; >- >-/** >- * @author Mik Kersten >- * @author Jeff Johnston >- */ >-public class RecommendedPreferencesWizard extends Wizard implements INewWizard { >- >- private RecommendedPreferencesWizardPage preferencePage; >- >- public static final String MYLYN_FIRST_RUN = "org.eclipse.mylyn.ui.first.run.0_4_9"; // $NON-NLS-1$ >- >- private static final String DEFAULT_FOLDING_PROVIDER = "org.eclipse.cdt.ui.text.defaultFoldingProvider"; // $NON-NLS-1$ >- >- private IPreferenceStore cPrefs = CUIPlugin.getDefault().getPreferenceStore(); >- >- public void init() { >- setDefaultPageImageDescriptor(ContextUiImages.MYLYN); >- setWindowTitle(CDTUIBridgePlugin.getResourceString("MylynCDT.preferencesWindowTitle")); // $NON-NLS-1$ >- super.setDefaultPageImageDescriptor(CDTUIBridgePlugin.imageDescriptorFromPlugin(CDTUIBridgePlugin.PLUGIN_ID, >- "icons/wizban/banner-prefs.gif")); // $NON-NLS-1$ >- preferencePage = new RecommendedPreferencesWizardPage(CDTUIBridgePlugin.getResourceString("MylynCDT.preferencesTitle")); // $NON-NLS-1$ >- } >- >- public RecommendedPreferencesWizard() { >- super(); >- init(); >- } >- >- public RecommendedPreferencesWizard(String htmlDocs) { >- super(); >- init(); >- } >- >- @Override >- public boolean performFinish() { >- setPreferences(); >- if (preferencePage.isOpenTaskList()) { >- TaskListView.openInActivePerspective(); >- } >- return true; >- } >- >- private void setPreferences() { >- boolean mylynContentAssist = preferencePage.isMylynContentAssistDefault(); >- CDTUiUtil.installContentAssist(cPrefs, mylynContentAssist); >- >- if (preferencePage.isAutoFolding()) { >- ContextUiPlugin.getDefault().getPreferenceStore().setValue(ContextUiPrefContstants.ACTIVE_FOLDING_ENABLED, >- true); >- cPrefs.setValue(PreferenceConstants.EDITOR_FOLDING_ENABLED, true); >- cPrefs.setValue(PreferenceConstants.EDITOR_FOLDING_PROVIDER, DEFAULT_FOLDING_PROVIDER); >- } else { >- ContextUiPlugin.getDefault().getPreferenceStore().setValue(ContextUiPrefContstants.ACTIVE_FOLDING_ENABLED, >- false); >- } >- >-// if (preferencePage.isCreateWorkingSet()) { >-// IWorkingSetManager workingSetManager = ContextUiPlugin.getDefault().getWorkbench().getWorkingSetManager(); >-// IWorkingSetNewWizard wizard = workingSetManager >-// .createWorkingSetNewWizard(new String[] { "org.eclipse.mylyn.workingSetPage" }); >-// if (wizard != null && workingSetManager.getWorkingSet(TaskContextWorkingSetPage.WORKING_SET_NAME) == null) { >-// WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(), wizard); >-// dialog.create(); >-// if (dialog.open() == Window.OK) { >-// IWorkingSet workingSet = wizard.getSelection(); >-// if (workingSet != null) { >-// workingSetManager.addWorkingSet(workingSet); >-// } >-// } >-// } >-// } else { >-// IWorkingSetManager workingSetManager = ContextUiPlugin.getDefault().getWorkbench().getWorkingSetManager(); >-// IWorkingSet workingSet = workingSetManager.getWorkingSet(TaskContextWorkingSetPage.WORKING_SET_NAME); >-// if (workingSet != null) { >-// workingSetManager.removeWorkingSet(workingSet); >-// } >-// } >- } >- >- @Override >- public void addPages() { >- addPage(preferencePage); >- } >- >- public void init(IWorkbench workbench, IStructuredSelection selection) { >- } >- >-}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
bjorn.freeman-benson
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 162558
:
63562
|
87836
|
91683
|
91692
|
92233
|
92367
|
92508
|
92752
|
95302
|
95303
|
102054
|
102056
|
102057
| 102058 |
102060
|
102339