1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

bug 301373: [API] add @noextend and @noimplement tags - org.eclipse.cdt.managedbuilder.ui

This commit is contained in:
Andrew Gvozdev 2010-02-07 22:24:45 +00:00
parent 022750b5dc
commit 9825c82b7f
66 changed files with 484 additions and 115 deletions

View file

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2 Bundle-ManifestVersion: 2
Bundle-Name: %pluginName Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.ui; singleton:=true Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.ui; singleton:=true
Bundle-Version: 5.2.0.qualifier Bundle-Version: 7.0.0.qualifier
Bundle-Activator: org.eclipse.cdt.managedbuilder.ui.properties.ManagedBuilderUIPlugin Bundle-Activator: org.eclipse.cdt.managedbuilder.ui.properties.ManagedBuilderUIPlugin
Bundle-Vendor: %providerName Bundle-Vendor: %providerName
Bundle-Localization: plugin Bundle-Localization: plugin

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007, 2008 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -50,9 +50,12 @@ import org.eclipse.ui.dialogs.ListSelectionDialog;
/** /**
* Action which changes active build configuration of the current project to * Action which changes active build configuration of the current project to
* the given one. * the given one.
*
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public class BuildAllAction extends ActionDelegate implements public class BuildAllAction extends ActionDelegate
IWorkbenchWindowPulldownDelegate2, IObjectActionDelegate, IMenuCreator { implements IWorkbenchWindowPulldownDelegate2, IObjectActionDelegate, IMenuCreator {
private static final String TIP_ALL = Messages.getString("BuildAllAction.0");//$NON-NLS-1$ private static final String TIP_ALL = Messages.getString("BuildAllAction.0");//$NON-NLS-1$
private static final String LBL_ALL = Messages.getString("BuildAllAction.1");//$NON-NLS-1$ private static final String LBL_ALL = Messages.getString("BuildAllAction.1");//$NON-NLS-1$
@ -67,6 +70,7 @@ IWorkbenchWindowPulldownDelegate2, IObjectActionDelegate, IMenuCreator {
private ActionContributionItem it_all = null; private ActionContributionItem it_all = null;
private ActionContributionItem it_sel = null; private ActionContributionItem it_sel = null;
@Override
public void selectionChanged(IAction action, ISelection selection) { public void selectionChanged(IAction action, ISelection selection) {
projects = null; projects = null;
@ -101,10 +105,12 @@ IWorkbenchWindowPulldownDelegate2, IObjectActionDelegate, IMenuCreator {
action.setMenuCreator(this); action.setMenuCreator(this);
} }
@Override
public void run(IAction action) {} // do nothing - show menus only public void run(IAction action) {} // do nothing - show menus only
public void setActivePart(IAction action, IWorkbenchPart targetPart) {} public void setActivePart(IAction action, IWorkbenchPart targetPart) {}
// doing nothing // doing nothing
@Override
public void dispose() { } public void dispose() { }
public void init(IWorkbenchWindow window) { } public void init(IWorkbenchWindow window) { }
@ -119,6 +125,7 @@ IWorkbenchWindowPulldownDelegate2, IObjectActionDelegate, IMenuCreator {
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor) * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
*/ */
@Override
protected IStatus run(IProgressMonitor monitor) { protected IStatus run(IProgressMonitor monitor) {
IConfiguration[] cf = new IConfiguration[cfs.length]; IConfiguration[] cf = new IConfiguration[cfs.length];
for (int i=0; i<cfs.length; i++) for (int i=0; i<cfs.length; i++)
@ -138,6 +145,7 @@ IWorkbenchWindowPulldownDelegate2, IObjectActionDelegate, IMenuCreator {
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object) * @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object)
*/ */
@Override
public boolean belongsTo(Object family) { public boolean belongsTo(Object family) {
return ResourcesPlugin.FAMILY_MANUAL_BUILD == family; return ResourcesPlugin.FAMILY_MANUAL_BUILD == family;
} }
@ -173,16 +181,17 @@ IWorkbenchWindowPulldownDelegate2, IObjectActionDelegate, IMenuCreator {
setToolTipText(forAll ? TIP_ALL : TIP_SEL); setToolTipText(forAll ? TIP_ALL : TIP_SEL);
} }
@Override
public void run() { public void run() {
if (projects == null || projects.isEmpty()) if (projects == null || projects.isEmpty())
return; return;
Iterator<IProject> it = projects.iterator(); Iterator<IProject> it = projects.iterator();
if (forAll) { if (forAll) {
while(it.hasNext()) while(it.hasNext())
processProject((IProject)it.next()); processProject(it.next());
} else { } else {
if (it.hasNext()) if (it.hasNext())
processProject((IProject)it.next()); processProject(it.next());
} }
} }
@ -208,6 +217,7 @@ IWorkbenchWindowPulldownDelegate2, IObjectActionDelegate, IMenuCreator {
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {} public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}
}, },
new LabelProvider() { new LabelProvider() {
@Override
public String getText(Object element) { public String getText(Object element) {
if (element == null || !(element instanceof ICConfigurationDescription)) return null; if (element == null || !(element instanceof ICConfigurationDescription)) return null;
return ((ICConfigurationDescription)element).getName(); return ((ICConfigurationDescription)element).getName();

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2006, 2008 Texas Instruments Incorporated and others. * Copyright (c) 2006, 2010 Texas Instruments Incorporated and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -45,6 +45,8 @@ import org.eclipse.ui.internal.ide.actions.BuildUtilities;
/** /**
* @author crecoskie * @author crecoskie
* *
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public class BuildFilesAction extends ActionDelegate implements public class BuildFilesAction extends ActionDelegate implements
IWorkbenchWindowActionDelegate { IWorkbenchWindowActionDelegate {
@ -79,6 +81,7 @@ public class BuildFilesAction extends ActionDelegate implements
* *
* @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose() * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose()
*/ */
@Override
public void dispose() { public void dispose() {
// TODO Auto-generated method stub // TODO Auto-generated method stub
@ -87,6 +90,7 @@ public class BuildFilesAction extends ActionDelegate implements
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.ui.actions.ActionDelegate#init(org.eclipse.jface.action.IAction) * @see org.eclipse.ui.actions.ActionDelegate#init(org.eclipse.jface.action.IAction)
*/ */
@Override
public void init(IAction action) { public void init(IAction action) {
this.action = action; this.action = action;
update(); update();
@ -242,6 +246,7 @@ public class BuildFilesAction extends ActionDelegate implements
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object) * @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object)
*/ */
@Override
public boolean belongsTo(Object family) { public boolean belongsTo(Object family) {
return ResourcesPlugin.FAMILY_MANUAL_BUILD == family; return ResourcesPlugin.FAMILY_MANUAL_BUILD == family;
} }
@ -253,6 +258,7 @@ public class BuildFilesAction extends ActionDelegate implements
* *
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
*/ */
@Override
public void run(IAction action) { public void run(IAction action) {
List<IFile> selectedFiles = getSelectedBuildableFiles(); List<IFile> selectedFiles = getSelectedBuildableFiles();

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2006, 2008 Texas Instruments Incorporated and others. * Copyright (c) 2006, 2010 Texas Instruments Incorporated and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -42,6 +42,8 @@ import org.eclipse.ui.actions.ActionDelegate;
/** /**
* @author crecoskie * @author crecoskie
* *
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public class CleanFilesAction extends ActionDelegate implements public class CleanFilesAction extends ActionDelegate implements
IWorkbenchWindowActionDelegate { IWorkbenchWindowActionDelegate {
@ -75,6 +77,7 @@ public class CleanFilesAction extends ActionDelegate implements
* *
* @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose() * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose()
*/ */
@Override
public void dispose() { public void dispose() {
// TODO Auto-generated method stub // TODO Auto-generated method stub
@ -83,6 +86,7 @@ public class CleanFilesAction extends ActionDelegate implements
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.ui.actions.ActionDelegate#init(org.eclipse.jface.action.IAction) * @see org.eclipse.ui.actions.ActionDelegate#init(org.eclipse.jface.action.IAction)
*/ */
@Override
public void init(IAction action) { public void init(IAction action) {
this.action = action; this.action = action;
update(); update();
@ -194,6 +198,7 @@ public class CleanFilesAction extends ActionDelegate implements
* *
* @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor) * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
*/ */
@Override
protected IStatus run(IProgressMonitor monitor) { protected IStatus run(IProgressMonitor monitor) {
synchronized (getClass()) { synchronized (getClass()) {
if (monitor.isCanceled()) { if (monitor.isCanceled()) {
@ -221,7 +226,7 @@ public class CleanFilesAction extends ActionDelegate implements
// clean each file // clean each file
while (iterator.hasNext() && !monitor.isCanceled()) { while (iterator.hasNext() && !monitor.isCanceled()) {
IFile file = (IFile) iterator.next(); IFile file = iterator.next();
GeneratedMakefileBuilder builder = new GeneratedMakefileBuilder(); GeneratedMakefileBuilder builder = new GeneratedMakefileBuilder();
builder.cleanFile(file, monitor); builder.cleanFile(file, monitor);
@ -242,6 +247,7 @@ public class CleanFilesAction extends ActionDelegate implements
return Status.OK_STATUS; return Status.OK_STATUS;
} }
@Override
public boolean belongsTo(Object family) { public boolean belongsTo(Object family) {
return ResourcesPlugin.FAMILY_MANUAL_BUILD == family; return ResourcesPlugin.FAMILY_MANUAL_BUILD == family;
} }
@ -252,6 +258,7 @@ public class CleanFilesAction extends ActionDelegate implements
* *
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
*/ */
@Override
public void run(IAction action) { public void run(IAction action) {
List<IFile> selectedFiles = getSelectedBuildableFiles(); List<IFile> selectedFiles = getSelectedBuildableFiles();
@ -338,6 +345,7 @@ public class CleanFilesAction extends ActionDelegate implements
* @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
* org.eclipse.jface.viewers.ISelection) * org.eclipse.jface.viewers.ISelection)
*/ */
@Override
public void selectionChanged(IAction action, ISelection selection) { public void selectionChanged(IAction action, ISelection selection) {
update(); update();
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2005, 2007 Intel Corporation and others. * Copyright (c) 2005, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -27,6 +27,10 @@ import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart; import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.actions.ActionDelegate; import org.eclipse.ui.actions.ActionDelegate;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class ConvertTargetAction public class ConvertTargetAction
extends ActionDelegate extends ActionDelegate
implements IObjectActionDelegate { implements IObjectActionDelegate {
@ -40,6 +44,7 @@ public class ConvertTargetAction
return; return;
} }
@Override
public void selectionChanged(IAction action, ISelection selection) { public void selectionChanged(IAction action, ISelection selection) {
if (selection instanceof IStructuredSelection) { if (selection instanceof IStructuredSelection) {
IStructuredSelection sel = (IStructuredSelection) selection; IStructuredSelection sel = (IStructuredSelection) selection;
@ -68,6 +73,7 @@ public class ConvertTargetAction
} }
@Override
public void run(IAction action) { public void run(IAction action) {
Shell shell = CUIPlugin.getActiveWorkbenchShell(); Shell shell = CUIPlugin.getActiveWorkbenchShell();

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2005, 2008 Intel Corporation and others. * Copyright (c) 2005, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -38,6 +38,10 @@ import org.eclipse.swt.widgets.List;
import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Shell;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class ConvertTargetDialog extends Dialog { public class ConvertTargetDialog extends Dialog {
final private String title; final private String title;
@ -66,6 +70,7 @@ public class ConvertTargetDialog extends Dialog {
setShellStyle(getShellStyle()|SWT.RESIZE); setShellStyle(getShellStyle()|SWT.RESIZE);
} }
@Override
protected void buttonPressed(int buttonId) { protected void buttonPressed(int buttonId) {
if (buttonId == IDialogConstants.OK_ID) { if (buttonId == IDialogConstants.OK_ID) {
@ -108,12 +113,14 @@ public class ConvertTargetDialog extends Dialog {
} }
@Override
protected void configureShell(Shell shell) { protected void configureShell(Shell shell) {
super.configureShell(shell); super.configureShell(shell);
if (title != null) if (title != null)
shell.setText(title); shell.setText(title);
} }
@Override
protected Control createDialogArea(Composite parent) { protected Control createDialogArea(Composite parent) {
Composite comp = new Composite(parent, SWT.NULL); Composite comp = new Composite(parent, SWT.NULL);
@ -161,8 +168,7 @@ public class ConvertTargetDialog extends Dialog {
String selectedConverterName = convertersList String selectedConverterName = convertersList
.getItem(selectionIndex); .getItem(selectionIndex);
IConfigurationElement selectedElement = (IConfigurationElement) getConversionElements() IConfigurationElement selectedElement = getConversionElements().get(selectedConverterName);
.get(selectedConverterName);
setSelectedConversionElement(selectedElement); setSelectedConversionElement(selectedElement);
return; return;
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -14,6 +14,9 @@ import org.eclipse.cdt.ui.newui.PrefPage_Abstract;
/** /**
* @since 5.1 * @since 5.1
*
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public class PrefPage_Env extends PrefPage_Abstract { public class PrefPage_Env extends PrefPage_Abstract {
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -13,6 +13,9 @@ package org.eclipse.cdt.managedbuilder.ui.preferences;
/** /**
* @since 5.1 * @since 5.1
*
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public class PrefPage_MultiConfig extends PrefPage_PropertyPage { public class PrefPage_MultiConfig extends PrefPage_PropertyPage {
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -22,12 +22,17 @@ import org.eclipse.core.runtime.CoreException;
/** /**
* @since 5.1 * @since 5.1
*
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public class PrefPage_NewCDTProject extends AbstractPrefPage { public class PrefPage_NewCDTProject extends AbstractPrefPage {
private ICConfigurationDescription prefCfgd = null; private ICConfigurationDescription prefCfgd = null;
@Override
protected boolean isSingle() { return false; } protected boolean isSingle() { return false; }
@Override
public ICResourceDescription getResDesc() { public ICResourceDescription getResDesc() {
if (prefCfgd == null) if (prefCfgd == null)
try { try {
@ -36,6 +41,7 @@ public class PrefPage_NewCDTProject extends AbstractPrefPage {
return prefCfgd.getRootFolderDescription(); return prefCfgd.getRootFolderDescription();
} }
@Override
public boolean performOk() { public boolean performOk() {
forEach(ICPropertyTab.OK, null); forEach(ICPropertyTab.OK, null);
try { try {
@ -44,6 +50,7 @@ public class PrefPage_NewCDTProject extends AbstractPrefPage {
return true; return true;
} }
@Override
protected String getHeader() { protected String getHeader() {
return UIMessages.getString("AbstractPrefPage.0"); //$NON-NLS-1$ return UIMessages.getString("AbstractPrefPage.0"); //$NON-NLS-1$
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -18,9 +18,13 @@ import org.eclipse.cdt.ui.newui.ICPropertyTab;
/** /**
* @since 5.1 * @since 5.1
*
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public class PrefPage_NewCDTWizard extends AbstractPrefPage { public class PrefPage_NewCDTWizard extends AbstractPrefPage {
@Override
protected String getHeader() { protected String getHeader() {
return Messages.getString("PrefPage_NewCDTWizard.0"); //$NON-NLS-1$ return Messages.getString("PrefPage_NewCDTWizard.0"); //$NON-NLS-1$
} }
@ -30,11 +34,14 @@ public class PrefPage_NewCDTWizard extends AbstractPrefPage {
* Tabs are responsible for saving, after OK signal. * Tabs are responsible for saving, after OK signal.
* No need to affect Project Description somehow. * No need to affect Project Description somehow.
*/ */
@Override
public boolean performOk() { public boolean performOk() {
forEach(ICPropertyTab.OK, null); forEach(ICPropertyTab.OK, null);
return true; return true;
} }
@Override
public ICResourceDescription getResDesc() { return null; } public ICResourceDescription getResDesc() { return null; }
@Override
protected boolean isSingle() { return false; } protected boolean isSingle() { return false; }
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -18,9 +18,13 @@ import org.eclipse.cdt.ui.newui.UIMessages;
/** /**
* @since 5.1 * @since 5.1
*
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public class PrefPage_PropertyPage extends AbstractPrefPage { public class PrefPage_PropertyPage extends AbstractPrefPage {
@Override
protected String getHeader() { protected String getHeader() {
return UIMessages.getString("PrefPage_PropertyPage.0"); //$NON-NLS-1$ return UIMessages.getString("PrefPage_PropertyPage.0"); //$NON-NLS-1$
} }
@ -30,11 +34,14 @@ public class PrefPage_PropertyPage extends AbstractPrefPage {
* Tabs are responsible for saving, after OK signal. * Tabs are responsible for saving, after OK signal.
* No need to affect Project Description somehow. * No need to affect Project Description somehow.
*/ */
@Override
public boolean performOk() { public boolean performOk() {
forEach(ICPropertyTab.OK, null); forEach(ICPropertyTab.OK, null);
return true; return true;
} }
@Override
public ICResourceDescription getResDesc() { return null; } public ICResourceDescription getResDesc() { return null; }
@Override
protected boolean isSingle() { return true; } protected boolean isSingle() { return true; }
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -14,6 +14,9 @@ import org.eclipse.cdt.ui.newui.PrefPage_Abstract;
/** /**
* @since 5.1 * @since 5.1
*
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public class PrefPage_Vars extends PrefPage_Abstract { public class PrefPage_Vars extends PrefPage_Abstract {

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007, 2008 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -39,6 +39,9 @@ import org.eclipse.swt.widgets.TreeItem;
/** /**
* @since 5.1 * @since 5.1
*
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public class PreferredToolchainsTab extends AbstractCBuildPropertyTab { public class PreferredToolchainsTab extends AbstractCBuildPropertyTab {

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007, 2008 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -27,6 +27,9 @@ import org.eclipse.swt.widgets.Label;
/** /**
* @since 5.1 * @since 5.1
*
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public class PropertyMultiCfgTab extends AbstractCPropertyTab { public class PropertyMultiCfgTab extends AbstractCPropertyTab {
@ -42,6 +45,7 @@ public class PropertyMultiCfgTab extends AbstractCPropertyTab {
private Button w_1; private Button w_1;
@Override
public void createControls(Composite parent) { public void createControls(Composite parent) {
super.createControls(parent); super.createControls(parent);
GridLayout g = new GridLayout(1, false); GridLayout g = new GridLayout(1, false);
@ -97,6 +101,7 @@ public class PropertyMultiCfgTab extends AbstractCPropertyTab {
} }
} }
@Override
protected void performOK() { protected void performOK() {
int x = 0; int x = 0;
if (d_1.getSelection()) if (d_1.getSelection())
@ -112,6 +117,7 @@ public class PropertyMultiCfgTab extends AbstractCPropertyTab {
CDTPrefUtil.setInt(CDTPrefUtil.KEY_WMODE, x); CDTPrefUtil.setInt(CDTPrefUtil.KEY_WMODE, x);
} }
@Override
protected void performDefaults() { protected void performDefaults() {
d_1.setSelection(true); d_1.setSelection(true);
d_2.setSelection(false); d_2.setSelection(false);
@ -119,7 +125,10 @@ public class PropertyMultiCfgTab extends AbstractCPropertyTab {
w_1.setSelection(false); w_1.setSelection(false);
} }
@Override
protected void performApply(ICResourceDescription src, ICResourceDescription dst) { performOK(); } protected void performApply(ICResourceDescription src, ICResourceDescription dst) { performOK(); }
@Override
protected void updateData(ICResourceDescription cfg) {} // Do nothing. Data is read once after creation protected void updateData(ICResourceDescription cfg) {} // Do nothing. Data is read once after creation
@Override
protected void updateButtons() {} // Do nothing. No buttons to update protected void updateButtons() {} // Do nothing. No buttons to update
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007, 2009 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -25,6 +25,9 @@ import org.eclipse.swt.widgets.Group;
/** /**
* @since 5.1 * @since 5.1
*
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public class PropertyPageDefsTab extends AbstractCPropertyTab { public class PropertyPageDefsTab extends AbstractCPropertyTab {

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -22,12 +22,16 @@ import org.eclipse.swt.widgets.Composite;
/** /**
* @since 5.1 * @since 5.1
*
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public class WizardDefaultsTab extends AbstractCPropertyTab { public class WizardDefaultsTab extends AbstractCPropertyTab {
private Button show_sup; private Button show_sup;
private Button show_oth; private Button show_oth;
@Override
public void createControls(Composite parent) { public void createControls(Composite parent) {
super.createControls(parent); super.createControls(parent);
usercomp.setLayout(new GridLayout(1, false)); usercomp.setLayout(new GridLayout(1, false));
@ -44,17 +48,22 @@ public class WizardDefaultsTab extends AbstractCPropertyTab {
show_oth.setSelection(CDTPrefUtil.getBool(CDTPrefUtil.KEY_OTHERS)); show_oth.setSelection(CDTPrefUtil.getBool(CDTPrefUtil.KEY_OTHERS));
} }
@Override
protected void performOK() { protected void performOK() {
CDTPrefUtil.setBool(CDTPrefUtil.KEY_NOSUPP, !show_sup.getSelection()); CDTPrefUtil.setBool(CDTPrefUtil.KEY_NOSUPP, !show_sup.getSelection());
CDTPrefUtil.setBool(CDTPrefUtil.KEY_OTHERS, show_oth.getSelection()); CDTPrefUtil.setBool(CDTPrefUtil.KEY_OTHERS, show_oth.getSelection());
} }
@Override
protected void performDefaults() { protected void performDefaults() {
show_sup.setSelection(true); show_sup.setSelection(true);
show_oth.setSelection(false); show_oth.setSelection(false);
} }
@Override
protected void performApply(ICResourceDescription src, ICResourceDescription dst) { performOK(); } protected void performApply(ICResourceDescription src, ICResourceDescription dst) { performOK(); }
@Override
protected void updateData(ICResourceDescription cfg) {} // Do nothing. Data is read once after creation protected void updateData(ICResourceDescription cfg) {} // Do nothing. Data is read once after creation
@Override
protected void updateButtons() {} // Do nothing. No buttons to update. protected void updateButtons() {} // Do nothing. No buttons to update.
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007, 2008 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -30,6 +30,9 @@ import org.eclipse.core.runtime.IPath;
* In addition to AbstractCPropertyTab functionality, * In addition to AbstractCPropertyTab functionality,
* provides several utility methods for configurations * provides several utility methods for configurations
* handling. * handling.
*
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public abstract class AbstractCBuildPropertyTab extends AbstractCPropertyTab { public abstract class AbstractCBuildPropertyTab extends AbstractCPropertyTab {
public IConfiguration getConfigurationFromHoldsOptions(IHoldsOptions ho){ public IConfiguration getConfigurationFromHoldsOptions(IHoldsOptions ho){

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -26,6 +26,8 @@ import org.eclipse.core.runtime.IPath;
* Bug #183341 : Single property page which does not * Bug #183341 : Single property page which does not
* require separate cPropertyTab to display data. * require separate cPropertyTab to display data.
* *
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public abstract class AbstractSingleBuildPage extends AbstractSinglePage { public abstract class AbstractSingleBuildPage extends AbstractSinglePage {
public IConfiguration getConfigurationFromHoldsOptions(IHoldsOptions ho){ public IConfiguration getConfigurationFromHoldsOptions(IHoldsOptions ho){

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2004, 2009 Rational Software Corporation and others. * Copyright (c) 2004, 2010 Rational Software Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -18,6 +18,10 @@ import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.util.PropertyChangeEvent; import org.eclipse.jface.util.PropertyChangeEvent;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public abstract class AbstractToolSettingUI extends FieldEditorPreferencePage { public abstract class AbstractToolSettingUI extends FieldEditorPreferencePage {
protected AbstractCBuildPropertyTab buildPropPage; protected AbstractCBuildPropertyTab buildPropPage;
@ -59,7 +63,7 @@ public abstract class AbstractToolSettingUI extends FieldEditorPreferencePage {
/** /**
* @param flag indicating that tooltip box need to be displayed * @param flag indicating that tooltip box need to be displayed
* @since 5.2 * @since 7.0
*/ */
protected void setToolTipBoxNeeded(boolean flag) { protected void setToolTipBoxNeeded(boolean flag) {
toolTipBoxNeeded = flag; toolTipBoxNeeded = flag;
@ -67,7 +71,7 @@ public abstract class AbstractToolSettingUI extends FieldEditorPreferencePage {
/** /**
* @return true if this page needs to have a tool tip box. * @return true if this page needs to have a tool tip box.
* @since 5.2 * @since 7.0
*/ */
protected boolean isToolTipBoxNeeded() { protected boolean isToolTipBoxNeeded() {
return toolTipBoxNeeded; return toolTipBoxNeeded;

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007, 2009 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -35,6 +35,10 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Label;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class ArtifactTab extends AbstractCBuildPropertyTab { public class ArtifactTab extends AbstractCBuildPropertyTab {
public static final String PROPERTY = ManagedBuildManager.BUILD_ARTEFACT_TYPE_PROPERTY_ID; public static final String PROPERTY = ManagedBuildManager.BUILD_ARTEFACT_TYPE_PROPERTY_ID;

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007, 2008 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -45,6 +45,10 @@ import org.eclipse.swt.widgets.Spinner;
import org.eclipse.swt.widgets.Text; import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Widget; import org.eclipse.swt.widgets.Widget;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class BuildBehaviourTab extends AbstractCBuildPropertyTab { public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
private static final int TRI_STATES_SIZE = 4; private static final int TRI_STATES_SIZE = 4;

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2002, 2008 IBM Corporation and others. * Copyright (c) 2002, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -23,6 +23,10 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.PlatformUI; import org.eclipse.ui.PlatformUI;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class BuildOptionComboFieldEditor extends FieldEditor { public class BuildOptionComboFieldEditor extends FieldEditor {
// Widgets and bookeeping variables // Widgets and bookeeping variables
@ -93,6 +97,7 @@ public class BuildOptionComboFieldEditor extends FieldEditor {
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.jface.preference.FieldEditor#adjustForNumColumns(int) * @see org.eclipse.jface.preference.FieldEditor#adjustForNumColumns(int)
*/ */
@Override
protected void adjustForNumColumns(int numColumns) { protected void adjustForNumColumns(int numColumns) {
// For now grab the excess space // For now grab the excess space
GridData gd = (GridData)optionSelector.getLayoutData(); GridData gd = (GridData)optionSelector.getLayoutData();
@ -103,6 +108,7 @@ public class BuildOptionComboFieldEditor extends FieldEditor {
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.jface.preference.FieldEditor#doFillIntoGrid(org.eclipse.swt.widgets.Composite, int) * @see org.eclipse.jface.preference.FieldEditor#doFillIntoGrid(org.eclipse.swt.widgets.Composite, int)
*/ */
@Override
protected void doFillIntoGrid(Composite parent, int numColumns) { protected void doFillIntoGrid(Composite parent, int numColumns) {
GridData gd = new GridData(GridData.FILL_HORIZONTAL); GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = numColumns; gd.horizontalSpan = numColumns;
@ -122,6 +128,7 @@ public class BuildOptionComboFieldEditor extends FieldEditor {
selectorData.grabExcessHorizontalSpace = true; selectorData.grabExcessHorizontalSpace = true;
optionSelector.setLayoutData(selectorData); optionSelector.setLayoutData(selectorData);
optionSelector.addSelectionListener(new SelectionAdapter() { optionSelector.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent evt) { public void widgetSelected(SelectionEvent evt) {
String oldValue = selected; String oldValue = selected;
int index = optionSelector.getSelectionIndex(); int index = optionSelector.getSelectionIndex();
@ -135,6 +142,7 @@ public class BuildOptionComboFieldEditor extends FieldEditor {
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.jface.preference.FieldEditor#doLoad() * @see org.eclipse.jface.preference.FieldEditor#doLoad()
*/ */
@Override
protected void doLoad() { protected void doLoad() {
// set all the options to option selector // set all the options to option selector
optionSelector.removeAll(); optionSelector.removeAll();
@ -151,6 +159,7 @@ public class BuildOptionComboFieldEditor extends FieldEditor {
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.jface.preference.FieldEditor#doLoadDefault() * @see org.eclipse.jface.preference.FieldEditor#doLoadDefault()
*/ */
@Override
protected void doLoadDefault() { protected void doLoadDefault() {
doLoad(); doLoad();
} }
@ -158,6 +167,7 @@ public class BuildOptionComboFieldEditor extends FieldEditor {
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.jface.preference.FieldEditor#doStore() * @see org.eclipse.jface.preference.FieldEditor#doStore()
*/ */
@Override
protected void doStore() { protected void doStore() {
// Save the selected item in the store // Save the selected item in the store
int index = optionSelector.getSelectionIndex(); int index = optionSelector.getSelectionIndex();
@ -172,6 +182,7 @@ public class BuildOptionComboFieldEditor extends FieldEditor {
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.jface.preference.FieldEditor#getNumberOfControls() * @see org.eclipse.jface.preference.FieldEditor#getNumberOfControls()
*/ */
@Override
public int getNumberOfControls() { public int getNumberOfControls() {
// There is just the label from the parent and the combo // There is just the label from the parent and the combo
return 2; return 2;
@ -205,7 +216,8 @@ public class BuildOptionComboFieldEditor extends FieldEditor {
* @param parent The parent of the controls in the group. * @param parent The parent of the controls in the group.
* Used to create the controls if required. * Used to create the controls if required.
*/ */
public void setEnabled(boolean enabled, Composite parent) { @Override
public void setEnabled(boolean enabled, Composite parent) {
getLabelControl(parent).setEnabled(enabled); getLabelControl(parent).setEnabled(enabled);
optionSelector.setEnabled(enabled); optionSelector.setEnabled(enabled);
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2003, 2009 IBM Corporation and others. * Copyright (c) 2003, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -96,7 +96,7 @@ public class BuildOptionSettingsUI extends AbstractToolSettingUI {
} }
/** /**
* @since 5.2 * @since 7.0
*/ */
public BuildOptionSettingsUI(AbstractCBuildPropertyTab page, public BuildOptionSettingsUI(AbstractCBuildPropertyTab page,
IResourceInfo info, IHoldsOptions optionHolder, IResourceInfo info, IHoldsOptions optionHolder,

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007, 2008 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -42,6 +42,10 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Group;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class BuildStepsTab extends AbstractCBuildPropertyTab { public class BuildStepsTab extends AbstractCBuildPropertyTab {
private Combo combo; private Combo combo;
private Combo preCmd; private Combo preCmd;
@ -86,6 +90,7 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab {
}; };
@Override
public void createControls(Composite parent) { public void createControls(Composite parent) {
super.createControls(parent); super.createControls(parent);
usercomp.setLayout(new GridLayout(1, false)); usercomp.setLayout(new GridLayout(1, false));
@ -149,6 +154,7 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab {
combo = new Combo(g1, SWT.READ_ONLY | SWT.DROP_DOWN | SWT.BORDER); combo = new Combo(g1, SWT.READ_ONLY | SWT.DROP_DOWN | SWT.BORDER);
combo.setItems(rcbsApplicabilityRules); combo.setItems(rcbsApplicabilityRules);
combo.addSelectionListener(new SelectionAdapter() { combo.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) { public void widgetSelected(SelectionEvent e) {
rcfg.setRcbsApplicability(sel2app(combo.getSelectionIndex())); rcfg.setRcbsApplicability(sel2app(combo.getSelectionIndex()));
}}); }});
@ -196,6 +202,7 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab {
}}); }});
} }
@Override
public void updateData(ICResourceDescription cfgd) { public void updateData(ICResourceDescription cfgd) {
if (cfgd == null) return; if (cfgd == null) return;
config = getCfg(cfgd.getConfiguration()); config = getCfg(cfgd.getConfiguration());
@ -304,6 +311,7 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab {
return path.toString(); return path.toString();
} }
@Override
public void performApply(ICResourceDescription src, ICResourceDescription dst) { public void performApply(ICResourceDescription src, ICResourceDescription dst) {
if (page.isForProject()) { if (page.isForProject()) {
IConfiguration cfg1 = getCfg(src.getConfiguration()); IConfiguration cfg1 = getCfg(src.getConfiguration());
@ -379,6 +387,7 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab {
// This page can be displayed for managed project only // This page can be displayed for managed project only
@Override
public boolean canBeVisible() { public boolean canBeVisible() {
if (page.isForProject() || page.isForFile()) { if (page.isForProject() || page.isForFile()) {
if (page.isMultiCfg()) { if (page.isMultiCfg()) {
@ -396,6 +405,7 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab {
return false; return false;
} }
@Override
protected void performDefaults() { protected void performDefaults() {
if (page.isForProject()) { if (page.isForProject()) {
config.setPrebuildStep(null); config.setPrebuildStep(null);
@ -417,6 +427,7 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab {
} }
update(); update();
} }
@Override
protected void updateButtons() {} // Do nothing. No buttons to update. protected void updateButtons() {} // Do nothing. No buttons to update.
private Combo setCombo(Composite c, FIELD field, Set<String> set) { private Combo setCombo(Composite c, FIELD field, Set<String> set) {

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2004, 2008 IBM Corporation and others. * Copyright (c) 2004, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -37,6 +37,10 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Label;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class BuildToolSettingUI extends AbstractToolSettingUI { public class BuildToolSettingUI extends AbstractToolSettingUI {
// Label class for a preference page. // Label class for a preference page.
@ -49,10 +53,12 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
this.createControl( parent ); this.createControl( parent );
} }
@Override
protected void adjustForNumColumns( int numColumns ) { protected void adjustForNumColumns( int numColumns ) {
((GridData)fTitleLabel.getLayoutData()).horizontalSpan = 2; ((GridData)fTitleLabel.getLayoutData()).horizontalSpan = 2;
} }
@Override
protected void doFillIntoGrid( Composite parent, int numColumns ) { protected void doFillIntoGrid( Composite parent, int numColumns ) {
fTitleLabel = new Label( parent, SWT.WRAP ); fTitleLabel = new Label( parent, SWT.WRAP );
fTitleLabel.setText( fTitle ); fTitleLabel.setText( fTitle );
@ -63,12 +69,16 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
fTitleLabel.setLayoutData( gd ); fTitleLabel.setLayoutData( gd );
} }
@Override
public int getNumberOfControls() { return 1; } public int getNumberOfControls() { return 1; }
/** /**
* The label field editor is only used to present a text label on a preference page. * The label field editor is only used to present a text label on a preference page.
*/ */
@Override
protected void doLoad() {} protected void doLoad() {}
@Override
protected void doLoadDefault() {} protected void doLoadDefault() {}
@Override
protected void doStore() {} protected void doStore() {}
} }
@ -117,6 +127,7 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.jface.preference.IPreferencePage#computeSize() * @see org.eclipse.jface.preference.IPreferencePage#computeSize()
*/ */
@Override
public Point computeSize() { public Point computeSize() {
return super.computeSize(); return super.computeSize();
} }
@ -126,6 +137,7 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
* *
* @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors() * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
*/ */
@Override
protected void createFieldEditors() { protected void createFieldEditors() {
// Load up the preference store // Load up the preference store
@ -238,6 +250,7 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
* @param tool * @param tool
* @return * @return
*/ */
@Override
public boolean isFor(Object tool, Object unused) { public boolean isFor(Object tool, Object unused) {
if (tool != null && tool instanceof ITool && unused == null) { if (tool != null && tool instanceof ITool && unused == null) {
return tool.equals(fTool); return tool.equals(fTool);
@ -462,6 +475,7 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.jface.preference.FieldEditorPreferencePage#performOk() * @see org.eclipse.jface.preference.FieldEditorPreferencePage#performOk()
*/ */
@Override
public boolean performOk() { public boolean performOk() {
return super.performOk(); return super.performOk();
} }
@ -469,16 +483,19 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
/** /**
* Update the field editor that displays all the build options * Update the field editor that displays all the build options
*/ */
@Override
public void updateFields() { public void updateFields() {
allOptionFieldEditor.load(); allOptionFieldEditor.load();
} }
@Override
public void setValues(){ public void setValues(){
commandStringField.load(); commandStringField.load();
commandLinePatternField.load(); commandLinePatternField.load();
updateFields(); updateFields();
} }
@Override
public void propertyChange(PropertyChangeEvent event) { public void propertyChange(PropertyChangeEvent event) {
// allow superclass to handle as well // allow superclass to handle as well
super.propertyChange(event); super.propertyChange(event);

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007, 2008 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -36,6 +36,10 @@ import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Widget; import org.eclipse.swt.widgets.Widget;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class BuilderSettingsTab extends AbstractCBuildPropertyTab { public class BuilderSettingsTab extends AbstractCBuildPropertyTab {
// Widgets // Widgets
//1 //1

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -17,9 +17,13 @@ import org.eclipse.cdt.ui.newui.CLocationOutputTab;
/** /**
* The same as CLocationOutputTab - but can be hidden * The same as CLocationOutputTab - but can be hidden
* in case of managed project * in case of managed project
*
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public class CBuildLocationOutputTab extends CLocationOutputTab { public class CBuildLocationOutputTab extends CLocationOutputTab {
@Override
public boolean canBeVisible() { public boolean canBeVisible() {
if (!page.isForProject()) if (!page.isForProject())
return false; // for project only return false; // for project only

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -16,6 +16,10 @@ import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.Preferences; import org.eclipse.core.runtime.Preferences;
import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.resource.ImageDescriptor;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class CNewOptionsPage extends NewCProjectWizardOptionPage { public class CNewOptionsPage extends NewCProjectWizardOptionPage {
public CNewOptionsPage(String pageName, String title, ImageDescriptor titleImage) { public CNewOptionsPage(String pageName, String title, ImageDescriptor titleImage) {
@ -25,15 +29,18 @@ public class CNewOptionsPage extends NewCProjectWizardOptionPage {
this(pageName, null, null); this(pageName, null, null);
} }
@Override
protected TabFolderOptionBlock createOptionBlock() { protected TabFolderOptionBlock createOptionBlock() {
// TODO Auto-generated method stub // TODO Auto-generated method stub
return null; return null;
} }
@Override
public Preferences getPreferences() { public Preferences getPreferences() {
return null; return null;
} }
@Override
public IProject getProject() { public IProject getProject() {
return null; return null;
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2005, 2008 Intel Corporation and others. * Copyright (c) 2005, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -77,6 +77,9 @@ import org.eclipse.swt.widgets.TableColumn;
/** /**
* displays the build macros for the given context * displays the build macros for the given context
*
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public class CPropertyVarsTab extends AbstractCPropertyTab { public class CPropertyVarsTab extends AbstractCPropertyTab {
/* /*

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -27,6 +27,9 @@ import org.eclipse.swt.widgets.Composite;
* It is subclassed from AbstractDiscoveryOptionsBlock * It is subclassed from AbstractDiscoveryOptionsBlock
* just to be passed to existing discovery pages. * just to be passed to existing discovery pages.
* All methods referenced by these pages are rewritten. * All methods referenced by these pages are rewritten.
*
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public class DiscoveryPageWrapper extends AbstractDiscoveryOptionsBlock { public class DiscoveryPageWrapper extends AbstractDiscoveryOptionsBlock {
@ -38,32 +41,50 @@ public class DiscoveryPageWrapper extends AbstractDiscoveryOptionsBlock {
page = _page; page = _page;
container = c; container = c;
} }
@Override
public IScannerConfigBuilderInfo2 getBuildInfo() { public IScannerConfigBuilderInfo2 getBuildInfo() {
return container.getBuildInfo(); return container.getBuildInfo();
} }
@Override
public IProject getProject() { public IProject getProject() {
return page.getProject(); return page.getProject();
} }
public String getErrorMessage() { @Override
public String getErrorMessage() {
return AbstractCPropertyTab.EMPTY_STR; return AbstractCPropertyTab.EMPTY_STR;
} }
public Preferences getPrefs() { @Override
public Preferences getPrefs() {
return page.getPreferences(); return page.getPreferences();
} }
public boolean isProfileDifferentThenPersisted() { return true; } @Override
public boolean isInitialized() { return true; } public boolean isProfileDifferentThenPersisted() { return true; }
public boolean isValid() { return true; } @Override
public boolean isInitialized() { return true; }
@Override
public boolean isValid() { return true; }
@Override
public boolean checkDialogForChanges() { return true; } public boolean checkDialogForChanges() { return true; }
@Override
public void callPerformApply() {} public void callPerformApply() {}
public void setInitialized(boolean initialized) {} @Override
public void setContainer(ICOptionContainer container) {} public void setInitialized(boolean initialized) {}
@Override
public void setContainer(ICOptionContainer container) {}
@Override
public void updateContainer() {} public void updateContainer() {}
@Override
public void updatePersistedProfile() {} public void updatePersistedProfile() {}
public void setVisible(boolean visible) {} @Override
public void setVisible(boolean visible) {}
@Override
protected String getCurrentProfileId() { return null; } protected String getCurrentProfileId() { return null; }
@Override
public void createControl(Composite parent) {} public void createControl(Composite parent) {}
@Override
public void performApply(IProgressMonitor monitor) throws CoreException {} public void performApply(IProgressMonitor monitor) throws CoreException {}
@Override
public void performDefaults() {} public void performDefaults() {}
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007, 2008 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -65,6 +65,10 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableItem; import org.eclipse.swt.widgets.TableItem;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInfoContainer { public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInfoContainer {
/** /**
* @deprecated since CDT 6.1 * @deprecated since CDT 6.1

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2004, 2009 BitMethods Inc and others. * Copyright (c) 2004, 2010 BitMethods Inc and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -37,8 +37,10 @@ import org.eclipse.ui.PlatformUI;
/** /**
* Field editor that uses FileListControl for user input. * Field editor that uses FileListControl for user input.
*
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public class FileListControlFieldEditor extends FieldEditor { public class FileListControlFieldEditor extends FieldEditor {
// file list control // file list control

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -22,6 +22,9 @@ import org.eclipse.core.resources.IProject;
* *
* In previous code, reference to specific * In previous code, reference to specific
* property page was used instead of interface. * property page was used instead of interface.
*
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public interface IBuildInfoContainer { public interface IBuildInfoContainer {
public IScannerConfigBuilderInfo2 getBuildInfo(); public IScannerConfigBuilderInfo2 getBuildInfo();

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2002, 2007 Rational Software Corporation and others. * Copyright (c) 2002, 2010 Rational Software Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -22,6 +22,9 @@ import org.eclipse.swt.graphics.Image;
/** /**
* Bundle of all images used by the C plugin. * Bundle of all images used by the C plugin.
*
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public class ManagedBuilderUIImages { public class ManagedBuilderUIImages {

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2002, 2007 IBM Corporation and others. * Copyright (c) 2002, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -13,6 +13,10 @@ package org.eclipse.cdt.managedbuilder.ui.properties;
import java.util.MissingResourceException; import java.util.MissingResourceException;
import java.util.ResourceBundle; import java.util.ResourceBundle;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class Messages { public class Messages {
private static final String BUNDLE_NAME = "org.eclipse.cdt.managedbuilder.ui.properties.messages"; //$NON-NLS-1$ private static final String BUNDLE_NAME = "org.eclipse.cdt.managedbuilder.ui.properties.messages"; //$NON-NLS-1$

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2003, 2007 IBM Corporation and others. * Copyright (c) 2003, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -44,6 +44,9 @@ import org.eclipse.swt.widgets.Text;
* Build-system specific version * Build-system specific version
* for "add new configuration" dialog * for "add new configuration" dialog
* in "Manage configurations" feature * in "Manage configurations" feature
*
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public class NewBuildConfigurationDialog extends Dialog { public class NewBuildConfigurationDialog extends Dialog {
// String constants // String constants

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007, 2009 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -58,6 +58,10 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text; import org.eclipse.swt.widgets.Text;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class NewCfgDialog implements INewCfgDialog { public class NewCfgDialog implements INewCfgDialog {
private static final String PREFIX = "NewConfiguration"; //$NON-NLS-1$ private static final String PREFIX = "NewConfiguration"; //$NON-NLS-1$
private static final String LABEL = PREFIX + ".label"; //$NON-NLS-1$ private static final String LABEL = PREFIX + ".label"; //$NON-NLS-1$

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2005 - 2008 Intel Corporation and others. * Copyright (c) 2005, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -47,8 +47,11 @@ import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text; import org.eclipse.swt.widgets.Text;
/* /**
* the dialog used to create or edit the build macro * the dialog used to create or edit the build macro
*
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public class NewVarDialog extends Dialog { public class NewVarDialog extends Dialog {
// String constants // String constants
@ -112,6 +115,7 @@ public class NewVarDialog extends Dialog {
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell) * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
*/ */
@Override
protected void configureShell(Shell shell) { protected void configureShell(Shell shell) {
super.configureShell(shell); super.configureShell(shell);
if (fTitle != null) if (fTitle != null)
@ -121,6 +125,7 @@ public class NewVarDialog extends Dialog {
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite) * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
*/ */
@Override
protected Control createDialogArea(Composite parent) { protected Control createDialogArea(Composite parent) {
Composite comp = new Composite(parent, SWT.NULL); Composite comp = new Composite(parent, SWT.NULL);
comp.setFont(parent.getFont()); comp.setFont(parent.getFont());
@ -148,6 +153,7 @@ public class NewVarDialog extends Dialog {
} }
}); });
fMacroNameEdit.addSelectionListener(new SelectionAdapter(){ fMacroNameEdit.addSelectionListener(new SelectionAdapter(){
@Override
public void widgetSelected(SelectionEvent e){ public void widgetSelected(SelectionEvent e){
handleMacroNameSelection(); handleMacroNameSelection();
} }
@ -160,6 +166,7 @@ public class NewVarDialog extends Dialog {
gd.horizontalSpan = 3; gd.horizontalSpan = 3;
c_all.setLayoutData(gd); c_all.setLayoutData(gd);
c_all.addSelectionListener(new SelectionAdapter(){ c_all.addSelectionListener(new SelectionAdapter(){
@Override
public void widgetSelected(SelectionEvent e){ public void widgetSelected(SelectionEvent e){
isForAllCfgs = ((Button)e.widget).getSelection(); isForAllCfgs = ((Button)e.widget).getSelection();
} }
@ -218,6 +225,7 @@ public class NewVarDialog extends Dialog {
fBrowseButton.setFont(comp.getFont()); fBrowseButton.setFont(comp.getFont());
fBrowseButton.setText(UIMessages.getString(BROWSE)); fBrowseButton.setText(UIMessages.getString(BROWSE));
fBrowseButton.addSelectionListener(new SelectionAdapter(){ fBrowseButton.addSelectionListener(new SelectionAdapter(){
@Override
public void widgetSelected(SelectionEvent e){ public void widgetSelected(SelectionEvent e){
handleBrowseButtonPressed(); handleBrowseButtonPressed();
} }
@ -451,6 +459,7 @@ public class NewVarDialog extends Dialog {
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.jface.dialogs.Dialog#okPressed() * @see org.eclipse.jface.dialogs.Dialog#okPressed()
*/ */
@Override
protected void okPressed(){ protected void okPressed(){
String name = getSelectedVarName(); String name = getSelectedVarName();
if(name != null || !EMPTY_STRING.equals(name)){ if(name != null || !EMPTY_STRING.equals(name)){
@ -467,6 +476,7 @@ public class NewVarDialog extends Dialog {
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.jface.window.Window#open() * @see org.eclipse.jface.window.Window#open()
*/ */
@Override
public int open(){ public int open(){
fResultingMacro = null; fResultingMacro = null;
return super.open(); return super.open();
@ -573,6 +583,7 @@ public class NewVarDialog extends Dialog {
} }
} }
@Override
protected Point getInitialSize() { protected Point getInitialSize() {
Point size = super.getInitialSize(); Point size = super.getInitialSize();
fTotalSizeCalculated = true; fTotalSizeCalculated = true;

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -16,7 +16,11 @@ import org.eclipse.cdt.ui.newui.AbstractPage;
/** /**
* The class have the same functionality as superclass. * The class have the same functionality as superclass.
* The only need to create it is distinguishing tabs. * The only need to create it is distinguishing tabs.
*/ *
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class Page_BuildSettings extends AbstractPage { public class Page_BuildSettings extends AbstractPage {
@Override
protected boolean isSingle() { return false; } protected boolean isSingle() { return false; }
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -12,6 +12,11 @@ package org.eclipse.cdt.managedbuilder.ui.properties;
import org.eclipse.cdt.ui.newui.AbstractPage; import org.eclipse.cdt.ui.newui.AbstractPage;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class Page_Discovery extends AbstractPage { public class Page_Discovery extends AbstractPage {
@Override
protected boolean isSingle() { return true; } protected boolean isSingle() { return true; }
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -12,6 +12,11 @@ package org.eclipse.cdt.managedbuilder.ui.properties;
import org.eclipse.cdt.ui.newui.AbstractPage; import org.eclipse.cdt.ui.newui.AbstractPage;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class Page_Environment extends AbstractPage { public class Page_Environment extends AbstractPage {
@Override
protected boolean isSingle() { return true; } protected boolean isSingle() { return true; }
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -17,6 +17,8 @@ import org.eclipse.cdt.ui.newui.AbstractPage;
* The class have the same functionality as superclass. * The class have the same functionality as superclass.
* The only need to create it is distinguishing tabs. * The only need to create it is distinguishing tabs.
* *
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public class Page_ExpPathAndSymb extends AbstractPage { public class Page_ExpPathAndSymb extends AbstractPage {

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -18,8 +18,13 @@ import org.eclipse.cdt.ui.newui.AbstractPage;
* The only need to create it is distinguishing tabs. * The only need to create it is distinguishing tabs.
* *
*/ */
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class Page_PathAndSymb extends AbstractPage { public class Page_PathAndSymb extends AbstractPage {
@Override
protected boolean isSingle() { protected boolean isSingle() {
return false; return false;
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -13,6 +13,11 @@ package org.eclipse.cdt.managedbuilder.ui.properties;
import org.eclipse.cdt.ui.newui.AbstractPage; import org.eclipse.cdt.ui.newui.AbstractPage;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class Page_ToolChain extends AbstractPage { public class Page_ToolChain extends AbstractPage {
@Override
protected boolean isSingle() { return true; } protected boolean isSingle() { return true; }
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -13,6 +13,11 @@ package org.eclipse.cdt.managedbuilder.ui.properties;
import org.eclipse.cdt.ui.newui.AbstractPage; import org.eclipse.cdt.ui.newui.AbstractPage;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class Page_Variables extends AbstractPage { public class Page_Variables extends AbstractPage {
@Override
protected boolean isSingle() { return true; } protected boolean isSingle() { return true; }
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2005, 2007 Intel Corporation and others. * Copyright (c) 2005, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -12,6 +12,11 @@ package org.eclipse.cdt.managedbuilder.ui.properties;
import org.eclipse.cdt.ui.newui.AbstractPage; import org.eclipse.cdt.ui.newui.AbstractPage;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class Page_head_build extends AbstractPage { public class Page_head_build extends AbstractPage {
@Override
protected boolean isSingle() { return false; } protected boolean isSingle() { return false; }
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -20,17 +20,22 @@ import org.eclipse.swt.widgets.Text;
* valueChanged() can be called outside. * valueChanged() can be called outside.
* *
* It allows to add extra listeners to Text widget. * It allows to add extra listeners to Text widget.
*
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public class StringFieldEditorM extends StringFieldEditor { public class StringFieldEditorM extends StringFieldEditor {
public StringFieldEditorM(String name, String labelText, Composite parent) { public StringFieldEditorM(String name, String labelText, Composite parent) {
super(name, labelText, parent); super(name, labelText, parent);
} }
public Text getTextControl() { @Override
public Text getTextControl() {
return super.getTextControl(); return super.getTextControl();
} }
public void valueChanged() { @Override
public void valueChanged() {
setPresentsDefaultValue(false); setPresentsDefaultValue(false);
boolean oldState = super.isValid(); boolean oldState = super.isValid();
super.refreshValidState(); super.refreshValidState();

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007, 2008 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -54,6 +54,10 @@ import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text; import org.eclipse.swt.widgets.Text;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class ToolChainEditTab extends AbstractCBuildPropertyTab { public class ToolChainEditTab extends AbstractCBuildPropertyTab {
private static final IToolChainModificationManager tcmmgr = ManagedBuildManager.getToolChainModificationManager(); private static final IToolChainModificationManager tcmmgr = ManagedBuildManager.getToolChainModificationManager();
@ -88,6 +92,7 @@ public class ToolChainEditTab extends AbstractCBuildPropertyTab {
private IResourceInfo ri; private IResourceInfo ri;
private IToolListModification mod; private IToolListModification mod;
@Override
public void createControls(Composite parent) { public void createControls(Composite parent) {
super.createControls(parent); super.createControls(parent);
usercomp.setLayout(new GridLayout(2, false)); usercomp.setLayout(new GridLayout(2, false));
@ -100,6 +105,7 @@ public class ToolChainEditTab extends AbstractCBuildPropertyTab {
gd.horizontalSpan = 1; gd.horizontalSpan = 1;
c_toolchain.setLayoutData(gd); c_toolchain.setLayoutData(gd);
c_toolchain.addSelectionListener(new SelectionAdapter() { c_toolchain.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) { public void widgetSelected(SelectionEvent e) {
modifyToolchain(); modifyToolchain();
}}); }});
@ -114,6 +120,7 @@ public class ToolChainEditTab extends AbstractCBuildPropertyTab {
gd.horizontalSpan = 1; gd.horizontalSpan = 1;
c_builder.setLayoutData(gd); c_builder.setLayoutData(gd);
c_builder.addSelectionListener(new SelectionAdapter() { c_builder.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) { public void widgetSelected(SelectionEvent e) {
modifyBuilder(); modifyBuilder();
}}); }});
@ -131,6 +138,7 @@ public class ToolChainEditTab extends AbstractCBuildPropertyTab {
gd.horizontalSpan = 2; gd.horizontalSpan = 2;
c_tool.setLayoutData(gd); c_tool.setLayoutData(gd);
c_tool.addSelectionListener(new SelectionAdapter() { c_tool.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) { public void widgetSelected(SelectionEvent e) {
saveToolSelected(); saveToolSelected();
}}); }});
@ -154,6 +162,7 @@ public class ToolChainEditTab extends AbstractCBuildPropertyTab {
gdb.widthHint = 80; gdb.widthHint = 80;
button_edit.setLayoutData(gdb); button_edit.setLayoutData(gdb);
button_edit.addSelectionListener(new SelectionAdapter() { button_edit.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) { public void widgetSelected(SelectionEvent event) {
modifyTools(); modifyTools();
}}); }});
@ -170,6 +179,7 @@ public class ToolChainEditTab extends AbstractCBuildPropertyTab {
return tcmmgr.createModification((IFileInfo)ri); return tcmmgr.createModification((IFileInfo)ri);
} }
@Override
protected void updateData(ICResourceDescription rcfg) { protected void updateData(ICResourceDescription rcfg) {
if (page.isMultiCfg()) { if (page.isMultiCfg()) {
setAllVisible(false, null); setAllVisible(false, null);
@ -422,9 +432,11 @@ public class ToolChainEditTab extends AbstractCBuildPropertyTab {
return result; return result;
} }
protected void checkPressed(SelectionEvent e) { @Override
protected void checkPressed(SelectionEvent e) {
updateData(); updateData();
} }
@Override
protected void performApply(ICResourceDescription src, protected void performApply(ICResourceDescription src,
ICResourceDescription dst) { ICResourceDescription dst) {
if (mod == null) if (mod == null)
@ -440,6 +452,7 @@ public class ToolChainEditTab extends AbstractCBuildPropertyTab {
} }
} }
@Override
protected void performDefaults() { protected void performDefaults() {
if (mod != null) { if (mod != null) {
mod.restoreDefaults(); mod.restoreDefaults();
@ -448,6 +461,7 @@ public class ToolChainEditTab extends AbstractCBuildPropertyTab {
} }
} }
@Override
protected void updateButtons() {} // Do nothing. No buttons to update. protected void updateButtons() {} // Do nothing. No buttons to update.
private void saveToolSelected() { private void saveToolSelected() {

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2002 - 2008 IBM Corporation and others. * Copyright (c) 2002, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -25,6 +25,10 @@ import org.eclipse.cdt.managedbuilder.core.IToolChain;
import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.Viewer;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class ToolListContentProvider implements ITreeContentProvider{ public class ToolListContentProvider implements ITreeContentProvider{
public static final int FILE = 0x1; public static final int FILE = 0x1;
public static final int FOLDER = 0x2; public static final int FOLDER = 0x2;
@ -65,7 +69,7 @@ public class ToolListContentProvider implements ITreeContentProvider{
createChildElements(e); createChildElements(e);
} }
} }
return (ToolListElement[])elementList.toArray(new ToolListElement[elementList.size()]); return elementList.toArray(new ToolListElement[elementList.size()]);
} }
private ToolListElement[] createElements(IResourceInfo info) { private ToolListElement[] createElements(IResourceInfo info) {
@ -87,7 +91,7 @@ public class ToolListContentProvider implements ITreeContentProvider{
createChildElements(e); createChildElements(e);
} }
} }
return (ToolListElement[])elementList.toArray(new ToolListElement[elementList.size()]); return elementList.toArray(new ToolListElement[elementList.size()]);
} }
private void createChildElements(ToolListElement parentElement) { private void createChildElements(ToolListElement parentElement) {

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2006, 2008 Intel Corporation and others. * Copyright (c) 2006, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -19,14 +19,17 @@ import org.eclipse.cdt.managedbuilder.core.IOptionCategory;
import org.eclipse.cdt.managedbuilder.core.ITool; import org.eclipse.cdt.managedbuilder.core.ITool;
import org.eclipse.cdt.managedbuilder.internal.core.OptionCategory; import org.eclipse.cdt.managedbuilder.internal.core.OptionCategory;
/******************************************************************************* /**
* This class represent the elements in the TreeViewer that displays the tools * This class represent the elements in the TreeViewer that displays the tools
* and categories in the tool options property pages. The reason for these * and categories in the tool options property pages. The reason for these
* elements is illustrated by bugzilla #123461. We used to use the ToolChain, * elements is illustrated by bugzilla #123461. We used to use the ToolChain,
* Tool and OptionCategory objects themselves as the elements in the TreeViewer, * Tool and OptionCategory objects themselves as the elements in the TreeViewer,
* but the same OptionCategory can appear more than once in the list of Tree * but the same OptionCategory can appear more than once in the list of Tree
* Viewer items, and this caused problems. * Viewer items, and this caused problems.
*******************************************************************************/ *
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class ToolListElement { public class ToolListElement {
/* /*
@ -109,7 +112,7 @@ public class ToolListElement {
*/ */
public ToolListElement[] getChildElements() { public ToolListElement[] getChildElements() {
if (childElements != null) if (childElements != null)
return (ToolListElement[])childElements.toArray(new ToolListElement[childElements.size()]); return childElements.toArray(new ToolListElement[childElements.size()]);
else else
return new ToolListElement[0]; return new ToolListElement[0];
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2002, 2007 IBM Corporation and others. * Copyright (c) 2002, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -23,6 +23,10 @@ import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Display;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class ToolListLabelProvider extends LabelProvider { public class ToolListLabelProvider extends LabelProvider {
private final Image IMG_TOOL = ManagedBuilderUIImages.get(ManagedBuilderUIImages.IMG_BUILD_TOOL); private final Image IMG_TOOL = ManagedBuilderUIImages.get(ManagedBuilderUIImages.IMG_BUILD_TOOL);
private final Image IMG_CAT = ManagedBuilderUIImages.get(ManagedBuilderUIImages.IMG_BUILD_CAT); private final Image IMG_CAT = ManagedBuilderUIImages.get(ManagedBuilderUIImages.IMG_BUILD_CAT);
@ -53,6 +57,7 @@ public class ToolListLabelProvider extends LabelProvider {
return img; return img;
} }
@Override
public Image getImage(Object element) { public Image getImage(Object element) {
if (!(element instanceof ToolListElement)) { if (!(element instanceof ToolListElement)) {
throw unknownElement(element); throw unknownElement(element);
@ -81,6 +86,7 @@ public class ToolListLabelProvider extends LabelProvider {
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.jface.viewers.ILabelProvider#getText(Object) * @see org.eclipse.jface.viewers.ILabelProvider#getText(Object)
*/ */
@Override
public String getText(Object element) { public String getText(Object element) {
if (!(element instanceof ToolListElement)) { if (!(element instanceof ToolListElement)) {
throw unknownElement(element); throw unknownElement(element);
@ -106,9 +112,10 @@ public class ToolListLabelProvider extends LabelProvider {
* *
* @since 3.0 * @since 3.0
*/ */
public void dispose() { @Override
public void dispose() {
if (descriptor != null && manager != null) { if (descriptor != null && manager != null) {
manager.destroyImage(descriptor); manager.destroyImage(descriptor);
} }
}; }
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007, 2008 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -79,11 +79,13 @@ public class ToolSelectionDialog extends Dialog {
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell) * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
*/ */
@Override
protected void configureShell(Shell shell) { protected void configureShell(Shell shell) {
super.configureShell(shell); super.configureShell(shell);
shell.setText(Messages.getString("ToolSelectionDialog.0")); //$NON-NLS-1$ shell.setText(Messages.getString("ToolSelectionDialog.0")); //$NON-NLS-1$
} }
@Override
protected Control createDialogArea(Composite parent) { protected Control createDialogArea(Composite parent) {
Composite composite = new Composite(parent, SWT.NULL); Composite composite = new Composite(parent, SWT.NULL);
composite.setFont(parent.getFont()); composite.setFont(parent.getFont());
@ -155,6 +157,7 @@ public class ToolSelectionDialog extends Dialog {
b_add = new Button(c2, SWT.PUSH); b_add = new Button(c2, SWT.PUSH);
b_add.setText(Messages.getString("ToolSelectionDialog.12")); //$NON-NLS-1$ b_add.setText(Messages.getString("ToolSelectionDialog.12")); //$NON-NLS-1$
b_add.addSelectionListener(new SelectionAdapter() { b_add.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) { public void widgetSelected(SelectionEvent e) {
int x = t1.getSelectionIndex(); int x = t1.getSelectionIndex();
if (x == -1) if (x == -1)
@ -170,6 +173,7 @@ public class ToolSelectionDialog extends Dialog {
b_rep = new Button(c2, SWT.PUSH); b_rep = new Button(c2, SWT.PUSH);
b_rep.setText(Messages.getString("ToolSelectionDialog.14")); //$NON-NLS-1$ b_rep.setText(Messages.getString("ToolSelectionDialog.14")); //$NON-NLS-1$
b_rep.addSelectionListener(new SelectionAdapter() { b_rep.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) { public void widgetSelected(SelectionEvent e) {
handleReplace(); handleReplace();
}}); }});
@ -179,6 +183,7 @@ public class ToolSelectionDialog extends Dialog {
b_del.setText(Messages.getString("ToolSelectionDialog.13")); //$NON-NLS-1$ b_del.setText(Messages.getString("ToolSelectionDialog.13")); //$NON-NLS-1$
b_del.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); b_del.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
b_del.addSelectionListener(new SelectionAdapter() { b_del.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) { public void widgetSelected(SelectionEvent e) {
int x = t2.getSelectionIndex(); int x = t2.getSelectionIndex();
if (x == -1) if (x == -1)
@ -200,6 +205,7 @@ public class ToolSelectionDialog extends Dialog {
b_all.setText(Messages.getString("ToolSelectionDialog.15")); //$NON-NLS-1$ b_all.setText(Messages.getString("ToolSelectionDialog.15")); //$NON-NLS-1$
b_all.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); b_all.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
b_all.addSelectionListener(new SelectionAdapter() { b_all.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) { public void widgetSelected(SelectionEvent e) {
handleSelection(); handleSelection();
}}); }});
@ -442,8 +448,8 @@ public class ToolSelectionDialog extends Dialog {
add(t, t2, !exists); add(t, t2, !exists);
} }
IModificationStatus st = fi.getToolChainModificationStatus( IModificationStatus st = fi.getToolChainModificationStatus(
(ITool[])removed.toArray(new ITool[removed.size()]), removed.toArray(new ITool[removed.size()]),
(ITool[])added.toArray(new ITool[added.size()])); added.toArray(new ITool[added.size()]));
if (st.isOK()) { if (st.isOK()) {
errorLabel.setText(EMPTY_STR); errorLabel.setText(EMPTY_STR);
if(getButton(IDialogConstants.OK_ID) != null) if(getButton(IDialogConstants.OK_ID) != null)

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2005, 2008 Intel Corporation and others. * Copyright (c) 2005, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -34,6 +34,10 @@ import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.util.IPropertyChangeListener; import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent; import org.eclipse.jface.util.PropertyChangeEvent;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class ToolSettingsPrefStore implements IPreferenceStore { public class ToolSettingsPrefStore implements IPreferenceStore {
public static final String DEFAULT_SEPERATOR = ";"; //$NON-NLS-1$ public static final String DEFAULT_SEPERATOR = ";"; //$NON-NLS-1$
private final static String EMPTY_STRING = new String(); private final static String EMPTY_STRING = new String();

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007, 2009 Intel Corporation, QNX Software Systems, and others. * Copyright (c) 2007, 2010 Intel Corporation, QNX Software Systems, and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -62,6 +62,10 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.ScrollBar; import org.eclipse.swt.widgets.ScrollBar;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class ToolSettingsTab extends AbstractCBuildPropertyTab implements IPreferencePageContainer { public class ToolSettingsTab extends AbstractCBuildPropertyTab implements IPreferencePageContainer {
/* /*
* Dialog widgets * Dialog widgets
@ -171,7 +175,7 @@ public class ToolSettingsTab extends AbstractCBuildPropertyTab implements IPrefe
/** /**
* @param name - header of the tooltip help * @param name - header of the tooltip help
* @param tip - tooltip text * @param tip - tooltip text
* @since 5.2 * @since 7.0
*/ */
protected void updateTipText(String name, String tip) { protected void updateTipText(String name, String tip) {
if (tipText==null) { if (tipText==null) {

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007, 2008 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -23,6 +23,10 @@ import org.eclipse.jface.wizard.IWizard;
import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Composite;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public abstract class AbstractCWizard extends CNewWizard { public abstract class AbstractCWizard extends CNewWizard {
protected static final Image IMG0 = CPluginImages.get(CPluginImages.IMG_OBJS_CFOLDER); protected static final Image IMG0 = CPluginImages.get(CPluginImages.IMG_OBJS_CFOLDER);

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007, 2008 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -46,6 +46,10 @@ import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableItem; import org.eclipse.swt.widgets.TableItem;
import org.eclipse.ui.dialogs.PreferencesUtil; import org.eclipse.ui.dialogs.PreferencesUtil;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class CDTConfigWizardPage extends WizardPage { public class CDTConfigWizardPage extends WizardPage {
public static final String PAGE_ID = "org.eclipse.cdt.managedbuilder.ui.wizard.CConfigWizardPage"; //$NON-NLS-1$ public static final String PAGE_ID = "org.eclipse.cdt.managedbuilder.ui.wizard.CConfigWizardPage"; //$NON-NLS-1$
@ -127,9 +131,11 @@ public class CDTConfigWizardPage extends WizardPage {
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {} public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}
}); });
tv.setLabelProvider(new LabelProvider() { tv.setLabelProvider(new LabelProvider() {
@Override
public String getText(Object element) { public String getText(Object element) {
return element == null ? EMPTY_STR : ((CfgHolder)element).getName(); return element == null ? EMPTY_STR : ((CfgHolder)element).getName();
} }
@Override
public Image getImage(Object element) { return IMG; } public Image getImage(Object element) { return IMG; }
}); });
tv.addCheckStateListener(new ICheckStateListener() { tv.addCheckStateListener(new ICheckStateListener() {
@ -145,6 +151,7 @@ public class CDTConfigWizardPage extends WizardPage {
b1.setText(UIMessages.getString("CConfigWizardPage.7")); //$NON-NLS-1$ b1.setText(UIMessages.getString("CConfigWizardPage.7")); //$NON-NLS-1$
b1.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); b1.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
b1.addSelectionListener(new SelectionAdapter() { b1.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) { public void widgetSelected(SelectionEvent e) {
tv.setAllChecked(true); tv.setAllChecked(true);
setPageComplete(isCustomPageComplete()); setPageComplete(isCustomPageComplete());
@ -155,6 +162,7 @@ public class CDTConfigWizardPage extends WizardPage {
b2.setText(UIMessages.getString("CConfigWizardPage.8")); //$NON-NLS-1$ b2.setText(UIMessages.getString("CConfigWizardPage.8")); //$NON-NLS-1$
b2.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); b2.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
b2.addSelectionListener(new SelectionAdapter() { b2.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) { public void widgetSelected(SelectionEvent e) {
tv.setAllChecked(false); tv.setAllChecked(false);
setPageComplete(isCustomPageComplete()); setPageComplete(isCustomPageComplete());
@ -168,6 +176,7 @@ public class CDTConfigWizardPage extends WizardPage {
b3.setText(UIMessages.getString("CConfigWizardPage.13")); //$NON-NLS-1$ b3.setText(UIMessages.getString("CConfigWizardPage.13")); //$NON-NLS-1$
b3.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); b3.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
b3.addSelectionListener(new SelectionAdapter() { b3.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) { public void widgetSelected(SelectionEvent e) {
advancedDialog(); advancedDialog();
}}); }});
@ -256,7 +265,8 @@ public class CDTConfigWizardPage extends WizardPage {
/** /**
* *
*/ */
public void setVisible(boolean visible) { @Override
public void setVisible(boolean visible) {
parent.setVisible(visible); parent.setVisible(visible);
isVisible = visible; isVisible = visible;
if (visible && handler != null && !isVisited()) { if (visible && handler != null && !isVisited()) {
@ -293,10 +303,15 @@ public class CDTConfigWizardPage extends WizardPage {
return l; return l;
} }
@Override
public String getName() { return TITLE; } public String getName() { return TITLE; }
@Override
public Control getControl() { return parent; } public Control getControl() { return parent; }
@Override
public String getErrorMessage() { return errorMessage; } public String getErrorMessage() { return errorMessage; }
@Override
public String getMessage() { return message; } public String getMessage() { return message; }
@Override
public String getTitle() { return TITLE; } public String getTitle() { return TITLE; }
protected void update() { protected void update() {
@ -329,6 +344,7 @@ public class CDTConfigWizardPage extends WizardPage {
} }
} }
@Override
public IWizardPage getNextPage() { public IWizardPage getNextPage() {
pagesLoaded = true; pagesLoaded = true;
return MBSCustomPageManager.getNextPage(PAGE_ID); return MBSCustomPageManager.getNextPage(PAGE_ID);

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007, 2008 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -18,11 +18,14 @@ import org.eclipse.cdt.managedbuilder.core.IToolChain;
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
import org.eclipse.cdt.ui.newui.UIMessages; import org.eclipse.cdt.ui.newui.UIMessages;
/* /**
* This class is intended for data exchange between * This class is intended for data exchange between
* Configuration page and Handlers. * Configuration page and Handlers.
* It may hold configuration in case of managed project * It may hold configuration in case of managed project
* or to be a placeholder in case of make project * or to be a placeholder in case of make project
*
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public class CfgHolder { public class CfgHolder {
private static final String DELIMITER = "_with_"; //$NON-NLS-1$ private static final String DELIMITER = "_with_"; //$NON-NLS-1$

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007, 2009 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -14,16 +14,23 @@ import org.eclipse.cdt.make.core.MakeCorePlugin;
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
import org.eclipse.cdt.ui.wizards.conversion.ConversionWizard; import org.eclipse.cdt.ui.wizards.conversion.ConversionWizard;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class ConvertToMakeWizard extends ConversionWizard { public class ConvertToMakeWizard extends ConversionWizard {
@Override
public void addPages() { public void addPages() {
addPage(mainPage = new ConvertToMakeWizardPage(getPrefix())); addPage(mainPage = new ConvertToMakeWizardPage(getPrefix()));
} }
@Override
public String getProjectID() { public String getProjectID() {
return MakeCorePlugin.MAKE_PROJECT_ID; return MakeCorePlugin.MAKE_PROJECT_ID;
} }
@Override
public String getBuildSystemId() { public String getBuildSystemId() {
if (!((ConvertToMakeWizardPage)mainPage).isSetProjectType()) { if (!((ConvertToMakeWizardPage)mainPage).isSetProjectType()) {
return ManagedBuildManager.CFG_DATA_PROVIDER_ID; return ManagedBuildManager.CFG_DATA_PROVIDER_ID;

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2009 QNX Software Systems and others. * Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -44,6 +44,10 @@ import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem; import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard; import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class ConvertToMakeWizardPage extends ConvertProjectWizardPage { public class ConvertToMakeWizardPage extends ConvertProjectWizardPage {
private static final String WZ_TITLE = "WizardMakeProjectConversion.title"; //$NON-NLS-1$ private static final String WZ_TITLE = "WizardMakeProjectConversion.title"; //$NON-NLS-1$
@ -70,6 +74,7 @@ public class ConvertToMakeWizardPage extends ConvertProjectWizardPage {
super(pageName); super(pageName);
} }
@Override
public void createControl(Composite parent) { public void createControl(Composite parent) {
super.createControl(parent); super.createControl(parent);
IStructuredSelection sel = ((BasicNewResourceWizard) getWizard()) IStructuredSelection sel = ((BasicNewResourceWizard) getWizard())
@ -80,6 +85,7 @@ public class ConvertToMakeWizardPage extends ConvertProjectWizardPage {
} }
} }
@Override
protected void addToMainPage(Composite container) { protected void addToMainPage(Composite container) {
super.addToMainPage(container); super.addToMainPage(container);
@ -116,6 +122,7 @@ public class ConvertToMakeWizardPage extends ConvertProjectWizardPage {
tree = new Tree(c, SWT.SINGLE | SWT.BORDER); tree = new Tree(c, SWT.SINGLE | SWT.BORDER);
tree.setLayoutData(new GridData(GridData.FILL_BOTH)); tree.setLayoutData(new GridData(GridData.FILL_BOTH));
tree.addSelectionListener(new SelectionAdapter() { tree.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) { public void widgetSelected(SelectionEvent e) {
TreeItem[] tis = tree.getSelection(); TreeItem[] tis = tree.getSelection();
if (tis == null || tis.length == 0) if (tis == null || tis.length == 0)
@ -161,6 +168,7 @@ public class ConvertToMakeWizardPage extends ConvertProjectWizardPage {
}; };
show_sup.addSelectionListener(new SelectionAdapter() { show_sup.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) { public void widgetSelected(SelectionEvent e) {
if (h_selected != null) if (h_selected != null)
h_selected.setSupportedOnly(show_sup.getSelection()); h_selected.setSupportedOnly(show_sup.getSelection());
@ -219,7 +227,8 @@ public class ConvertToMakeWizardPage extends ConvertProjectWizardPage {
* Method getWzTitleResource returns the correct Title Label for this class * Method getWzTitleResource returns the correct Title Label for this class
* overriding the default in the superclass. * overriding the default in the superclass.
*/ */
protected String getWzTitleResource(){ @Override
protected String getWzTitleResource(){
return MakeUIPlugin.getResourceString(WZ_TITLE); return MakeUIPlugin.getResourceString(WZ_TITLE);
} }
@ -227,7 +236,8 @@ public class ConvertToMakeWizardPage extends ConvertProjectWizardPage {
* Method getWzDescriptionResource returns the correct description * Method getWzDescriptionResource returns the correct description
* Label for this class overriding the default in the superclass. * Label for this class overriding the default in the superclass.
*/ */
protected String getWzDescriptionResource(){ @Override
protected String getWzDescriptionResource(){
return MakeUIPlugin.getResourceString(WZ_DESC); return MakeUIPlugin.getResourceString(WZ_DESC);
} }
@ -239,13 +249,15 @@ public class ConvertToMakeWizardPage extends ConvertProjectWizardPage {
* old style managed projects * old style managed projects
* are refused. * are refused.
*/ */
public boolean isCandidate(IProject project) { @Override
public boolean isCandidate(IProject project) {
boolean a = !AbstractPage.isCDTPrj(project); boolean a = !AbstractPage.isCDTPrj(project);
boolean b = ManagedBuilderCorePlugin.getDefault().isOldStyleMakeProject(project); boolean b = ManagedBuilderCorePlugin.getDefault().isOldStyleMakeProject(project);
return a || b; return a || b;
} }
public void convertProject(IProject project, String bsId, IProgressMonitor monitor) throws CoreException{ @Override
public void convertProject(IProject project, String bsId, IProgressMonitor monitor) throws CoreException{
monitor.beginTask(MakeUIPlugin.getResourceString("WizardMakeProjectConversion.monitor.convertingToMakeProject"), 3); //$NON-NLS-1$ monitor.beginTask(MakeUIPlugin.getResourceString("WizardMakeProjectConversion.monitor.convertingToMakeProject"), 3); //$NON-NLS-1$
try { try {
if (ManagedBuilderCorePlugin.getDefault().isOldStyleMakeProject(project)) { if (ManagedBuilderCorePlugin.getDefault().isOldStyleMakeProject(project)) {
@ -261,6 +273,7 @@ public class ConvertToMakeWizardPage extends ConvertProjectWizardPage {
} }
} }
@Override
public void convertProject(IProject project, IProgressMonitor monitor, String projectID) throws CoreException { public void convertProject(IProject project, IProgressMonitor monitor, String projectID) throws CoreException {
monitor.beginTask(MakeUIPlugin.getResourceString("WizardMakeProjectConversion.monitor.convertingToMakeProject"), 3); //$NON-NLS-1$ monitor.beginTask(MakeUIPlugin.getResourceString("WizardMakeProjectConversion.monitor.convertingToMakeProject"), 3); //$NON-NLS-1$
try { try {

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2005, 2007 Texas Instruments Incorporated and others. * Copyright (c) 2005, 2010 Texas Instruments Incorporated and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -23,6 +23,9 @@ import org.eclipse.jface.wizard.IWizardPage;
/** /**
* This class is responsible for storing all of the data associated with a given custom wizard page. * This class is responsible for storing all of the data associated with a given custom wizard page.
*
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public final class MBSCustomPageData public final class MBSCustomPageData
{ {
@ -99,7 +102,8 @@ public final class MBSCustomPageData
/* (non-Javadoc) /* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object) * @see java.lang.Object#equals(java.lang.Object)
*/ */
public boolean equals(Object obj) { @Override
public boolean equals(Object obj) {
if (obj == null || !(obj instanceof ToolchainData)) if (obj == null || !(obj instanceof ToolchainData))
return false; return false;
if (this == obj) { if (this == obj) {

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2005, 2007 Texas Instruments Incorporated and others. * Copyright (c) 2005, 2010 Texas Instruments Incorporated and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -38,6 +38,9 @@ import org.eclipse.jface.wizard.IWizardPage;
* New Project wizards. * New Project wizards.
* *
* This class is a singleton. * This class is a singleton.
*
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public final class MBSCustomPageManager public final class MBSCustomPageManager
{ {

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007, 2008 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -78,6 +78,8 @@ import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
* - corresponding line in left pane of 1st wizard page * - corresponding line in left pane of 1st wizard page
* - whole view of right pane, including * - whole view of right pane, including
* *
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public class MBSWizardHandler extends CWizardHandler { public class MBSWizardHandler extends CWizardHandler {
public static final String ARTIFACT = "org.eclipse.cdt.build.core.buildArtefactType"; //$NON-NLS-1$ public static final String ARTIFACT = "org.eclipse.cdt.build.core.buildArtefactType"; //$NON-NLS-1$

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007, 2008 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -29,7 +29,8 @@ import org.eclipse.jface.wizard.IWizard;
import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.Image;
/** /**
* * @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public class ManagedBuildWizard extends AbstractCWizard { public class ManagedBuildWizard extends AbstractCWizard {
private static final Image IMG = CPluginImages.get(CPluginImages.IMG_OBJS_CONTAINER); private static final Image IMG = CPluginImages.get(CPluginImages.IMG_OBJS_CONTAINER);
@ -42,6 +43,7 @@ public class ManagedBuildWizard extends AbstractCWizard {
/** /**
* Creates and returns an array of items to be displayed * Creates and returns an array of items to be displayed
*/ */
@Override
public EntryDescriptor[] createItems(boolean supportedOnly, IWizard wizard) { public EntryDescriptor[] createItems(boolean supportedOnly, IWizard wizard) {
IBuildPropertyManager bpm = ManagedBuildManager.getBuildPropertyManager(); IBuildPropertyManager bpm = ManagedBuildManager.getBuildPropertyManager();
IBuildPropertyType bpt = bpm.getPropertyType(MBSWizardHandler.ARTIFACT); IBuildPropertyType bpt = bpm.getPropertyType(MBSWizardHandler.ARTIFACT);
@ -62,7 +64,7 @@ public class ManagedBuildWizard extends AbstractCWizard {
// The project category item. // The project category item.
items.add(new EntryDescriptor(vs[i].getId(), null, vs[i].getName(), true, h, null)); items.add(new EntryDescriptor(vs[i].getId(), null, vs[i].getName(), true, h, null));
// A default project type for that category -- not using any template. // A default project type for that category -- not using any template.
EntryDescriptor entryDescriptor = new EntryDescriptor(vs[i].getId() + ".default", vs[i].getId(), EntryDescriptor entryDescriptor = new EntryDescriptor(vs[i].getId() + ".default", vs[i].getId(), //$NON-NLS-1$
EMPTY_PROJECT, false, h, null); EMPTY_PROJECT, false, h, null);
entryDescriptor.setDefaultForCategory(true); entryDescriptor.setDefaultForCategory(true);
items.add(entryDescriptor); items.add(entryDescriptor);
@ -73,7 +75,7 @@ public class ManagedBuildWizard extends AbstractCWizard {
EntryDescriptor oldsRoot = null; EntryDescriptor oldsRoot = null;
SortedMap<String, IProjectType> sm = ManagedBuildManager.getExtensionProjectTypeMap(); SortedMap<String, IProjectType> sm = ManagedBuildManager.getExtensionProjectTypeMap();
for (String s : sm.keySet()) { for (String s : sm.keySet()) {
IProjectType pt = (IProjectType)sm.get(s); IProjectType pt = sm.get(s);
if (pt.isAbstract() || pt.isSystemObject()) continue; if (pt.isAbstract() || pt.isSystemObject()) continue;
if (supportedOnly && !pt.isSupported()) continue; // not supported if (supportedOnly && !pt.isSupported()) continue; // not supported
String nattr = pt.getNameAttribute(); String nattr = pt.getNameAttribute();
@ -110,11 +112,11 @@ public class ManagedBuildWizard extends AbstractCWizard {
items.add(oldsRoot); items.add(oldsRoot);
} }
pId = oldsRoot.getId(); pId = oldsRoot.getId();
} else { // do not group to <Others> } else {
pId = null; // do not group to <Others> - pId = null;
} }
items.add(new EntryDescriptor(pt.getId(), pId, pt.getName(), false, h, IMG)); items.add(new EntryDescriptor(pt.getId(), pId, pt.getName(), false, h, IMG));
} }
return (EntryDescriptor[])items.toArray(new EntryDescriptor[items.size()]); return items.toArray(new EntryDescriptor[items.size()]);
} }
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007, 2008 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -31,12 +31,17 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.wizard.IWizard; import org.eclipse.jface.wizard.IWizard;
import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Composite;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class STDWizardHandler extends MBSWizardHandler { public class STDWizardHandler extends MBSWizardHandler {
public STDWizardHandler(Composite p, IWizard w) { public STDWizardHandler(Composite p, IWizard w) {
super(Messages.getString("StdBuildWizard.0"), p, w); //$NON-NLS-1$ super(Messages.getString("StdBuildWizard.0"), p, w); //$NON-NLS-1$
} }
@Override
public void addTc(IToolChain tc) { public void addTc(IToolChain tc) {
if (tc == null) { if (tc == null) {
full_tcs.put(UIMessages.getString("StdProjectTypeHandler.0"), null); //$NON-NLS-1$ full_tcs.put(UIMessages.getString("StdProjectTypeHandler.0"), null); //$NON-NLS-1$
@ -101,6 +106,7 @@ public class STDWizardHandler extends MBSWizardHandler {
} }
public boolean canCreateWithoutToolchain() { return true; } public boolean canCreateWithoutToolchain() { return true; }
@Override
public void convertProject(IProject proj, IProgressMonitor monitor) throws CoreException { public void convertProject(IProject proj, IProgressMonitor monitor) throws CoreException {
setProjectDescription(proj, true, true, monitor); setProjectDescription(proj, true, true, monitor);
} }
@ -108,6 +114,7 @@ public class STDWizardHandler extends MBSWizardHandler {
/** /**
* If no toolchains selected by user, use default toolchain * If no toolchains selected by user, use default toolchain
*/ */
@Override
public IToolChain[] getSelectedToolChains() { public IToolChain[] getSelectedToolChains() {
if (full_tcs.size() == 0 || table.getSelection().length == 0) if (full_tcs.size() == 0 || table.getSelection().length == 0)
return new IToolChain[] { null }; return new IToolChain[] { null };

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others. * Copyright (c) 2007, 2010 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -16,6 +16,10 @@ import org.eclipse.cdt.managedbuilder.ui.properties.Messages;
import org.eclipse.cdt.ui.wizards.EntryDescriptor; import org.eclipse.cdt.ui.wizards.EntryDescriptor;
import org.eclipse.jface.wizard.IWizard; import org.eclipse.jface.wizard.IWizard;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class StdBuildWizard extends AbstractCWizard { public class StdBuildWizard extends AbstractCWizard {
private static final String NAME = Messages.getString("StdBuildWizard.0"); //$NON-NLS-1$ private static final String NAME = Messages.getString("StdBuildWizard.0"); //$NON-NLS-1$
private static final String ID = "org.eclipse.cdt.build.makefile.projectType"; //$NON-NLS-1$ private static final String ID = "org.eclipse.cdt.build.makefile.projectType"; //$NON-NLS-1$
@ -25,6 +29,7 @@ public class StdBuildWizard extends AbstractCWizard {
*/ */
public static final String EMPTY_PROJECT = Messages.getString("AbstractCWizard.0"); //$NON-NLS-1$ public static final String EMPTY_PROJECT = Messages.getString("AbstractCWizard.0"); //$NON-NLS-1$
@Override
public EntryDescriptor[] createItems(boolean supportedOnly, IWizard wizard) { public EntryDescriptor[] createItems(boolean supportedOnly, IWizard wizard) {
STDWizardHandler h = new STDWizardHandler(parent, wizard); STDWizardHandler h = new STDWizardHandler(parent, wizard);
h.addTc(null); // add default toolchain h.addTc(null); // add default toolchain
@ -34,7 +39,7 @@ public class StdBuildWizard extends AbstractCWizard {
h.addTc(tcs[i]); h.addTc(tcs[i]);
EntryDescriptor wd = new EntryDescriptor(ID, null, NAME, true, h, null); EntryDescriptor wd = new EntryDescriptor(ID, null, NAME, true, h, null);
EntryDescriptor wd2 = new EntryDescriptor(ID + ".default", ID, EntryDescriptor wd2 = new EntryDescriptor(ID + ".default", ID, //$NON-NLS-1$
EMPTY_PROJECT, false, h, null); EMPTY_PROJECT, false, h, null);
wd2.setDefaultForCategory(true); wd2.setDefaultForCategory(true);