mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-28 11:25:35 +02:00
compilation warnings
This commit is contained in:
parent
c129e2c2b1
commit
fec0fa3fad
9 changed files with 59 additions and 73 deletions
|
@ -32,6 +32,7 @@ import org.eclipse.jface.text.presentation.PresentationReconciler;
|
||||||
import org.eclipse.jface.text.reconciler.IReconciler;
|
import org.eclipse.jface.text.reconciler.IReconciler;
|
||||||
import org.eclipse.jface.text.reconciler.MonoReconciler;
|
import org.eclipse.jface.text.reconciler.MonoReconciler;
|
||||||
import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
|
import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
|
||||||
|
import org.eclipse.jface.text.rules.IRule;
|
||||||
import org.eclipse.jface.text.rules.ITokenScanner;
|
import org.eclipse.jface.text.rules.ITokenScanner;
|
||||||
import org.eclipse.jface.text.source.IAnnotationHover;
|
import org.eclipse.jface.text.source.IAnnotationHover;
|
||||||
import org.eclipse.jface.text.source.ISourceViewer;
|
import org.eclipse.jface.text.source.ISourceViewer;
|
||||||
|
@ -62,7 +63,7 @@ public class MakefileSourceConfiguration extends TextSourceViewerConfiguration {
|
||||||
* @see org.eclipse.cdt.make.internal.ui.text.makefile.AbstractMakefileCodeScanner#createRules()
|
* @see org.eclipse.cdt.make.internal.ui.text.makefile.AbstractMakefileCodeScanner#createRules()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected List createRules() {
|
protected List<IRule> createRules() {
|
||||||
setDefaultReturnToken(getToken(fProperties[0]));
|
setDefaultReturnToken(getToken(fProperties[0]));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -198,7 +199,6 @@ public class MakefileSourceConfiguration extends TextSourceViewerConfiguration {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param event
|
|
||||||
* @return <code>true</code> if the given property change event affects the code coloring
|
* @return <code>true</code> if the given property change event affects the code coloring
|
||||||
*/
|
*/
|
||||||
public boolean affectsBehavior(PropertyChangeEvent event) {
|
public boolean affectsBehavior(PropertyChangeEvent event) {
|
||||||
|
@ -211,9 +211,6 @@ public class MakefileSourceConfiguration extends TextSourceViewerConfiguration {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param event
|
|
||||||
*/
|
|
||||||
public void adaptToPreferenceChange(PropertyChangeEvent event) {
|
public void adaptToPreferenceChange(PropertyChangeEvent event) {
|
||||||
if (fCodeScanner != null) {
|
if (fCodeScanner != null) {
|
||||||
fCodeScanner.adaptToPreferenceChange(event);
|
fCodeScanner.adaptToPreferenceChange(event);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2006 IBM Corporation and others.
|
* Copyright (c) 2000, 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,7 +23,6 @@ import org.eclipse.swt.widgets.Composite;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @author
|
|
||||||
*/
|
*/
|
||||||
public class CheckboxTablePart extends StructuredViewerPart {
|
public class CheckboxTablePart extends StructuredViewerPart {
|
||||||
public CheckboxTablePart(String[] buttonLabels) {
|
public CheckboxTablePart(String[] buttonLabels) {
|
||||||
|
@ -33,6 +32,7 @@ public class CheckboxTablePart extends StructuredViewerPart {
|
||||||
/*
|
/*
|
||||||
* @see StructuredViewerPart#createStructuredViewer(Composite, FormWidgetFactory)
|
* @see StructuredViewerPart#createStructuredViewer(Composite, FormWidgetFactory)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected StructuredViewer createStructuredViewer(Composite parent, int style) {
|
protected StructuredViewer createStructuredViewer(Composite parent, int style) {
|
||||||
style |= SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER;
|
style |= SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER;
|
||||||
CheckboxTableViewer tableViewer = CheckboxTableViewer.newCheckList(parent, style);
|
CheckboxTableViewer tableViewer = CheckboxTableViewer.newCheckList(parent, style);
|
||||||
|
@ -56,6 +56,7 @@ public class CheckboxTablePart extends StructuredViewerPart {
|
||||||
/*
|
/*
|
||||||
* @see SharedPartWithButtons#buttonSelected(int)
|
* @see SharedPartWithButtons#buttonSelected(int)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected void buttonSelected(Button button, int index) {
|
protected void buttonSelected(Button button, int index) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2002, 2008 QNX Software Systems and others.
|
* Copyright (c) 2002, 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
|
||||||
|
@ -46,25 +46,25 @@ import org.eclipse.ui.IWorkbenchPreferencePage;
|
||||||
public abstract class AbstractMakefileEditorPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
|
public abstract class AbstractMakefileEditorPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
|
||||||
OverlayPreferenceStore fOverlayStore;
|
OverlayPreferenceStore fOverlayStore;
|
||||||
|
|
||||||
Map fCheckBoxes= new HashMap();
|
Map<Control, String> fCheckBoxes= new HashMap<Control, String>();
|
||||||
private SelectionListener fCheckBoxListener= new SelectionListener() {
|
private SelectionListener fCheckBoxListener= new SelectionListener() {
|
||||||
public void widgetDefaultSelected(SelectionEvent e) {
|
public void widgetDefaultSelected(SelectionEvent e) {
|
||||||
}
|
}
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
Button button= (Button) e.widget;
|
Button button= (Button) e.widget;
|
||||||
fOverlayStore.setValue((String) fCheckBoxes.get(button), button.getSelection());
|
fOverlayStore.setValue(fCheckBoxes.get(button), button.getSelection());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Map fTextFields= new HashMap();
|
Map<Control, String> fTextFields= new HashMap<Control, String>();
|
||||||
private ModifyListener fTextFieldListener= new ModifyListener() {
|
private ModifyListener fTextFieldListener= new ModifyListener() {
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
Text text= (Text) e.widget;
|
Text text= (Text) e.widget;
|
||||||
fOverlayStore.setValue((String) fTextFields.get(text), text.getText());
|
fOverlayStore.setValue(fTextFields.get(text), text.getText());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private Map fNumberFields= new HashMap();
|
private Map<Text, String[]> fNumberFields= new HashMap<Text, String[]>();
|
||||||
private ModifyListener fNumberFieldListener= new ModifyListener() {
|
private ModifyListener fNumberFieldListener= new ModifyListener() {
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
numberFieldChanged((Text) e.widget);
|
numberFieldChanged((Text) e.widget);
|
||||||
|
@ -86,19 +86,19 @@ public abstract class AbstractMakefileEditorPreferencePage extends PreferencePag
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void initializeFields() {
|
protected void initializeFields() {
|
||||||
Map checkBoxes= getCheckBoxes();
|
Map<Control, String> checkBoxes= getCheckBoxes();
|
||||||
Map textFields= getTextFields();
|
Map<Control, String> textFields= getTextFields();
|
||||||
Iterator e= checkBoxes.keySet().iterator();
|
Iterator<Control> e= checkBoxes.keySet().iterator();
|
||||||
while (e.hasNext()) {
|
while (e.hasNext()) {
|
||||||
Button b= (Button) e.next();
|
Button b= (Button) e.next();
|
||||||
String key= (String) checkBoxes.get(b);
|
String key= checkBoxes.get(b);
|
||||||
b.setSelection(getOverlayStore().getBoolean(key));
|
b.setSelection(getOverlayStore().getBoolean(key));
|
||||||
}
|
}
|
||||||
|
|
||||||
e= textFields.keySet().iterator();
|
e= textFields.keySet().iterator();
|
||||||
while (e.hasNext()) {
|
while (e.hasNext()) {
|
||||||
Text t= (Text) e.next();
|
Text t= (Text) e.next();
|
||||||
String key= (String) textFields.get(t);
|
String key= textFields.get(t);
|
||||||
t.setText(getOverlayStore().getString(key));
|
t.setText(getOverlayStore().getString(key));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -106,6 +106,7 @@ public abstract class AbstractMakefileEditorPreferencePage extends PreferencePag
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.preference.IPreferencePage#performOk()
|
* @see org.eclipse.jface.preference.IPreferencePage#performOk()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean performOk() {
|
public boolean performOk() {
|
||||||
getOverlayStore().propagate();
|
getOverlayStore().propagate();
|
||||||
MakeUIPlugin.getDefault().savePluginPreferences();
|
MakeUIPlugin.getDefault().savePluginPreferences();
|
||||||
|
@ -120,21 +121,22 @@ public abstract class AbstractMakefileEditorPreferencePage extends PreferencePag
|
||||||
return fOverlayStore;
|
return fOverlayStore;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Map getCheckBoxes() {
|
protected Map<Control, String> getCheckBoxes() {
|
||||||
return fCheckBoxes;
|
return fCheckBoxes;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Map getTextFields() {
|
protected Map<Control, String> getTextFields() {
|
||||||
return fTextFields;
|
return fTextFields;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Map getNumberFields() {
|
protected Map<Text, String[]> getNumberFields() {
|
||||||
return fNumberFields;
|
return fNumberFields;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.preference.PreferencePage#performDefaults()
|
* @see org.eclipse.jface.preference.PreferencePage#performDefaults()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected void performDefaults() {
|
protected void performDefaults() {
|
||||||
getOverlayStore().loadDefaults();
|
getOverlayStore().loadDefaults();
|
||||||
initializeFields();
|
initializeFields();
|
||||||
|
@ -147,6 +149,7 @@ public abstract class AbstractMakefileEditorPreferencePage extends PreferencePag
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.dialogs.IDialogPage#dispose()
|
* @see org.eclipse.jface.dialogs.IDialogPage#dispose()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
if (getOverlayStore() != null) {
|
if (getOverlayStore() != null) {
|
||||||
getOverlayStore().stop();
|
getOverlayStore().stop();
|
||||||
|
@ -200,9 +203,9 @@ public abstract class AbstractMakefileEditorPreferencePage extends PreferencePag
|
||||||
|
|
||||||
void numberFieldChanged(Text textControl) {
|
void numberFieldChanged(Text textControl) {
|
||||||
String number= textControl.getText();
|
String number= textControl.getText();
|
||||||
IStatus status= validatePositiveNumber(number, (String[])getNumberFields().get(textControl));
|
IStatus status= validatePositiveNumber(number, getNumberFields().get(textControl));
|
||||||
if (!status.matches(IStatus.ERROR)) {
|
if (!status.matches(IStatus.ERROR)) {
|
||||||
getOverlayStore().setValue((String) getTextFields().get(textControl), number);
|
getOverlayStore().setValue(getTextFields().get(textControl), number);
|
||||||
}
|
}
|
||||||
updateStatus(status);
|
updateStatus(status);
|
||||||
}
|
}
|
||||||
|
@ -225,10 +228,10 @@ public abstract class AbstractMakefileEditorPreferencePage extends PreferencePag
|
||||||
|
|
||||||
private void updateStatus(IStatus status) {
|
private void updateStatus(IStatus status) {
|
||||||
if (!status.matches(IStatus.ERROR)) {
|
if (!status.matches(IStatus.ERROR)) {
|
||||||
Set keys= getNumberFields().keySet();
|
Set<Text> keys= getNumberFields().keySet();
|
||||||
for (Iterator iter = keys.iterator(); iter.hasNext();) {
|
for (Iterator<Text> iter = keys.iterator(); iter.hasNext();) {
|
||||||
Text text = (Text) iter.next();
|
Text text = iter.next();
|
||||||
IStatus s= validatePositiveNumber(text.getText(), (String[])getNumberFields().get(text));
|
IStatus s= validatePositiveNumber(text.getText(), getNumberFields().get(text));
|
||||||
status= s.getSeverity() > status.getSeverity() ? s : status;
|
status= s.getSeverity() > status.getSeverity() ? s : status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,6 +53,7 @@ public class ColorEditor {
|
||||||
|
|
||||||
fButton.setImage(fImage);
|
fButton.setImage(fImage);
|
||||||
fButton.addSelectionListener(new SelectionAdapter() {
|
fButton.addSelectionListener(new SelectionAdapter() {
|
||||||
|
@Override
|
||||||
public void widgetSelected(SelectionEvent event) {
|
public void widgetSelected(SelectionEvent event) {
|
||||||
ColorDialog colorDialog= new ColorDialog(fButton.getShell());
|
ColorDialog colorDialog= new ColorDialog(fButton.getShell());
|
||||||
colorDialog.setRGB(fColorValue);
|
colorDialog.setRGB(fColorValue);
|
||||||
|
|
|
@ -47,22 +47,22 @@ public class ColorManager implements ISharedTextColors {
|
||||||
return fgColorManager;
|
return fgColorManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Map fColorTable = new HashMap(10);
|
protected Map<RGB, Color> fColorTable = new HashMap<RGB, Color>(10);
|
||||||
|
|
||||||
/**
|
/* (non-Javadoc)
|
||||||
* @see IMakefileColorManager#dispose()
|
* @see org.eclipse.jface.text.source.ISharedTextColors#dispose()
|
||||||
*/
|
*/
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
Iterator e = fColorTable.values().iterator();
|
Iterator<Color> e = fColorTable.values().iterator();
|
||||||
while (e.hasNext())
|
while (e.hasNext())
|
||||||
((Color) e.next()).dispose();
|
(e.next()).dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/* (non-Javadoc)
|
||||||
* @see IMakefileColorManager#getColor(RGB)
|
* @see org.eclipse.jface.text.source.ISharedTextColors#getColor(org.eclipse.swt.graphics.RGB)
|
||||||
*/
|
*/
|
||||||
public Color getColor(RGB rgb) {
|
public Color getColor(RGB rgb) {
|
||||||
Color color = (Color) fColorTable.get(rgb);
|
Color color = fColorTable.get(rgb);
|
||||||
if (color == null) {
|
if (color == null) {
|
||||||
color = new Color(Display.getCurrent(), rgb);
|
color = new Color(Display.getCurrent(), rgb);
|
||||||
fColorTable.put(rgb, color);
|
fColorTable.put(rgb, color);
|
||||||
|
|
|
@ -34,7 +34,7 @@ import org.eclipse.swt.graphics.RGB;
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractMakefileCodeScanner extends RuleBasedScanner {
|
public abstract class AbstractMakefileCodeScanner extends RuleBasedScanner {
|
||||||
|
|
||||||
private Map fTokenMap= new HashMap();
|
private Map<String, Token> fTokenMap= new HashMap<String, Token>();
|
||||||
private String[] fPropertyNamesColor;
|
private String[] fPropertyNamesColor;
|
||||||
/**
|
/**
|
||||||
* Preference keys for boolean preferences which are <code>true</code>,
|
* Preference keys for boolean preferences which are <code>true</code>,
|
||||||
|
@ -57,7 +57,7 @@ public abstract class AbstractMakefileCodeScanner extends RuleBasedScanner {
|
||||||
/**
|
/**
|
||||||
* Creates the list of rules controlling this scanner.
|
* Creates the list of rules controlling this scanner.
|
||||||
*/
|
*/
|
||||||
abstract protected List createRules();
|
abstract protected List<IRule> createRules();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Must be called after the constructor has been called.
|
* Must be called after the constructor has been called.
|
||||||
|
@ -79,7 +79,7 @@ public abstract class AbstractMakefileCodeScanner extends RuleBasedScanner {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initializeRules() {
|
private void initializeRules() {
|
||||||
List rules= createRules();
|
List<IRule> rules= createRules();
|
||||||
if (rules != null) {
|
if (rules != null) {
|
||||||
IRule[] result= new IRule[rules.size()];
|
IRule[] result= new IRule[rules.size()];
|
||||||
rules.toArray(result);
|
rules.toArray(result);
|
||||||
|
@ -88,7 +88,7 @@ public abstract class AbstractMakefileCodeScanner extends RuleBasedScanner {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Token getToken(String key) {
|
protected Token getToken(String key) {
|
||||||
return (Token) fTokenMap.get(key);
|
return fTokenMap.get(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addToken(String colorKey, String boldKey, String italicKey) {
|
private void addToken(String colorKey, String boldKey, String italicKey) {
|
||||||
|
|
|
@ -13,9 +13,9 @@ package org.eclipse.cdt.make.ui.dialogs;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.util.ExceptionHandler;
|
import org.eclipse.cdt.internal.ui.util.ExceptionHandler;
|
||||||
import org.eclipse.cdt.make.core.scannerconfig.IScannerConfigBuilderInfo2;
|
import org.eclipse.cdt.make.core.scannerconfig.IScannerConfigBuilderInfo2;
|
||||||
|
@ -63,7 +63,7 @@ public abstract class AbstractDiscoveryOptionsBlock extends AbstractCOptionPage
|
||||||
private boolean fInitialized = false;
|
private boolean fInitialized = false;
|
||||||
private String fPersistedProfileId = null;
|
private String fPersistedProfileId = null;
|
||||||
|
|
||||||
private Map fProfilePageMap = null;
|
private Map<String, DiscoveryProfilePageConfiguration> fProfilePageMap = null;
|
||||||
|
|
||||||
// Composite parent provided by the block.
|
// Composite parent provided by the block.
|
||||||
private Composite fCompositeParent;
|
private Composite fCompositeParent;
|
||||||
|
@ -159,18 +159,11 @@ public abstract class AbstractDiscoveryOptionsBlock extends AbstractCOptionPage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param title
|
|
||||||
*/
|
|
||||||
public AbstractDiscoveryOptionsBlock(String title) {
|
public AbstractDiscoveryOptionsBlock(String title) {
|
||||||
super(title);
|
super(title);
|
||||||
initializeProfilePageMap();
|
initializeProfilePageMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param title
|
|
||||||
* @param image
|
|
||||||
*/
|
|
||||||
public AbstractDiscoveryOptionsBlock(String title, ImageDescriptor image) {
|
public AbstractDiscoveryOptionsBlock(String title, ImageDescriptor image) {
|
||||||
super(title, image);
|
super(title, image);
|
||||||
initializeProfilePageMap();
|
initializeProfilePageMap();
|
||||||
|
@ -180,7 +173,7 @@ public abstract class AbstractDiscoveryOptionsBlock extends AbstractCOptionPage
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private void initializeProfilePageMap() {
|
private void initializeProfilePageMap() {
|
||||||
fProfilePageMap = new HashMap(5);
|
fProfilePageMap = new HashMap<String, DiscoveryProfilePageConfiguration>(5);
|
||||||
|
|
||||||
IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(MakeUIPlugin.getPluginId(), "DiscoveryProfilePage"); //$NON-NLS-1$
|
IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(MakeUIPlugin.getPluginId(), "DiscoveryProfilePage"); //$NON-NLS-1$
|
||||||
IConfigurationElement[] infos = extensionPoint.getConfigurationElements();
|
IConfigurationElement[] infos = extensionPoint.getConfigurationElements();
|
||||||
|
@ -195,7 +188,8 @@ public abstract class AbstractDiscoveryOptionsBlock extends AbstractCOptionPage
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.ui.dialogs.ICOptionPage#setContainer(org.eclipse.cdt.ui.dialogs.ICOptionContainer)
|
* @see org.eclipse.cdt.ui.dialogs.ICOptionPage#setContainer(org.eclipse.cdt.ui.dialogs.ICOptionContainer)
|
||||||
*/
|
*/
|
||||||
public void setContainer(ICOptionContainer container) {
|
@Override
|
||||||
|
public void setContainer(ICOptionContainer container) {
|
||||||
super.setContainer(container);
|
super.setContainer(container);
|
||||||
|
|
||||||
fPrefs = getContainer().getPreferences();
|
fPrefs = getContainer().getPreferences();
|
||||||
|
@ -222,9 +216,6 @@ public abstract class AbstractDiscoveryOptionsBlock extends AbstractCOptionPage
|
||||||
getContainer().updateContainer();
|
getContainer().updateContainer();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param project
|
|
||||||
*/
|
|
||||||
protected void createBuildInfo() {
|
protected void createBuildInfo() {
|
||||||
if (getProject() != null) {
|
if (getProject() != null) {
|
||||||
try {
|
try {
|
||||||
|
@ -267,7 +258,8 @@ public abstract class AbstractDiscoveryOptionsBlock extends AbstractCOptionPage
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.dialogs.IDialogPage#setVisible(boolean)
|
* @see org.eclipse.jface.dialogs.IDialogPage#setVisible(boolean)
|
||||||
*/
|
*/
|
||||||
public void setVisible(boolean visible) {
|
@Override
|
||||||
|
public void setVisible(boolean visible) {
|
||||||
super.setVisible(visible);
|
super.setVisible(visible);
|
||||||
if (visible) {
|
if (visible) {
|
||||||
handleDiscoveryProfileChanged();
|
handleDiscoveryProfileChanged();
|
||||||
|
@ -309,20 +301,22 @@ public abstract class AbstractDiscoveryOptionsBlock extends AbstractCOptionPage
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.ui.dialogs.AbstractDiscoveryPage#isValid()
|
* @see org.eclipse.cdt.ui.dialogs.AbstractDiscoveryPage#isValid()
|
||||||
*/
|
*/
|
||||||
public boolean isValid() {
|
@Override
|
||||||
|
public boolean isValid() {
|
||||||
return (getCurrentPage() == null) ? true : getCurrentPage().isValid();
|
return (getCurrentPage() == null) ? true : getCurrentPage().isValid();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.dialogs.IDialogPage#getErrorMessage()
|
* @see org.eclipse.jface.dialogs.IDialogPage#getErrorMessage()
|
||||||
*/
|
*/
|
||||||
public String getErrorMessage() {
|
@Override
|
||||||
|
public String getErrorMessage() {
|
||||||
return getCurrentPage().getErrorMessage();
|
return getCurrentPage().getErrorMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected AbstractDiscoveryPage getDiscoveryProfilePage(String profileId) {
|
protected AbstractDiscoveryPage getDiscoveryProfilePage(String profileId) {
|
||||||
DiscoveryProfilePageConfiguration configElement =
|
DiscoveryProfilePageConfiguration configElement =
|
||||||
(DiscoveryProfilePageConfiguration) fProfilePageMap.get(profileId);
|
fProfilePageMap.get(profileId);
|
||||||
if (configElement != null) {
|
if (configElement != null) {
|
||||||
try {
|
try {
|
||||||
return configElement.getPage();
|
return configElement.getPage();
|
||||||
|
@ -334,7 +328,7 @@ public abstract class AbstractDiscoveryOptionsBlock extends AbstractCOptionPage
|
||||||
|
|
||||||
protected String getDiscoveryProfileName(String profileId) {
|
protected String getDiscoveryProfileName(String profileId) {
|
||||||
DiscoveryProfilePageConfiguration configElement =
|
DiscoveryProfilePageConfiguration configElement =
|
||||||
(DiscoveryProfilePageConfiguration) fProfilePageMap.get(profileId);
|
fProfilePageMap.get(profileId);
|
||||||
if (configElement != null) {
|
if (configElement != null) {
|
||||||
return configElement.getName();
|
return configElement.getName();
|
||||||
}
|
}
|
||||||
|
@ -342,8 +336,8 @@ public abstract class AbstractDiscoveryOptionsBlock extends AbstractCOptionPage
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String getDiscoveryProfileId(String profileName) {
|
protected String getDiscoveryProfileId(String profileName) {
|
||||||
for (Iterator I = fProfilePageMap.keySet().iterator(); I.hasNext();) {
|
Set<String> profileIds = fProfilePageMap.keySet();
|
||||||
String profileId = (String) I.next();
|
for (String profileId : profileIds) {
|
||||||
String confProfileName = getDiscoveryProfileName(profileId);
|
String confProfileName = getDiscoveryProfileName(profileId);
|
||||||
if (profileName.equals(confProfileName)) {
|
if (profileName.equals(confProfileName)) {
|
||||||
return profileId;
|
return profileId;
|
||||||
|
@ -352,8 +346,8 @@ public abstract class AbstractDiscoveryOptionsBlock extends AbstractCOptionPage
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected List getDiscoveryProfileIdList() {
|
protected List<String> getDiscoveryProfileIdList() {
|
||||||
return new ArrayList(fProfilePageMap.keySet());
|
return new ArrayList<String>(fProfilePageMap.keySet());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract String getCurrentProfileId();
|
protected abstract String getCurrentProfileId();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2004, 2007 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
|
||||||
|
@ -73,17 +73,10 @@ public abstract class AbstractDiscoveryPage extends DialogPage {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param title
|
|
||||||
*/
|
|
||||||
public AbstractDiscoveryPage(String title) {
|
public AbstractDiscoveryPage(String title) {
|
||||||
super(title);
|
super(title);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param title
|
|
||||||
* @param image
|
|
||||||
*/
|
|
||||||
public AbstractDiscoveryPage(String title, ImageDescriptor image) {
|
public AbstractDiscoveryPage(String title, ImageDescriptor image) {
|
||||||
super(title, image);
|
super(title, image);
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,9 +48,6 @@ public class ConvertToMakeProjectWizard extends ConversionWizard {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* ConvertToStdMakeConversionWizard Wizard constructor
|
* ConvertToStdMakeConversionWizard Wizard constructor
|
||||||
*
|
|
||||||
* @param title
|
|
||||||
* @param desc
|
|
||||||
*/
|
*/
|
||||||
public ConvertToMakeProjectWizard(String title, String desc) {
|
public ConvertToMakeProjectWizard(String title, String desc) {
|
||||||
super(title, desc);
|
super(title, desc);
|
||||||
|
|
Loading…
Add table
Reference in a new issue