Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2013-08-29 13:30:25 -0400
committerLars Vogel2013-08-29 13:32:42 -0400
commit258ea380ac8d29639dae2490b87e402ad5a83903 (patch)
tree7324dd97e9c7e88d840708b8a32c085379c56d0d
parent7efae2e3d56bb8b0e744ac4bbd02cfaa4dec4e00 (diff)
downloadorg.eclipse.e4.tools-I20130904-2200.tar.gz
org.eclipse.e4.tools-I20130904-2200.tar.xz
org.eclipse.e4.tools-I20130904-2200.zip
Change-Id: I441f3332521eda474a135a298509e97b8151a755 Signed-off-by: Lars Vogel <Lars.Vogel@gmail.com>
-rw-r--r--bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/ToolsPlugin.java2
-rw-r--r--bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/AbstractNewClassPage.java2
-rw-r--r--bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/AbstractNewClassWizard.java5
-rw-r--r--bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/NewPartClassWizard.java2
-rw-r--r--bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/BaseApplicationModelWizard.java2
-rw-r--r--bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/ExtractContributionModelWizard.java3
-rw-r--r--bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/NewApplicationModelWizard.java1
-rw-r--r--bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/NewContributionModelWizard.java1
-rw-r--r--bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/NewModelFilePage.java4
-rw-r--r--bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/E4NewProjectWizard.java6
-rw-r--r--bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/NewApplicationWizardPage.java3
-rw-r--r--bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/PluginContentPage.java10
12 files changed, 33 insertions, 8 deletions
diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/ToolsPlugin.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/ToolsPlugin.java
index 1a9fa293..18b87cae 100644
--- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/ToolsPlugin.java
+++ b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/ToolsPlugin.java
@@ -23,6 +23,7 @@ public class ToolsPlugin extends AbstractUIPlugin {
* org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
* )
*/
+ @Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
@@ -35,6 +36,7 @@ public class ToolsPlugin extends AbstractUIPlugin {
* org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
* )
*/
+ @Override
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/AbstractNewClassPage.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/AbstractNewClassPage.java
index 689c024a..6c728526 100644
--- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/AbstractNewClassPage.java
+++ b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/AbstractNewClassPage.java
@@ -274,6 +274,7 @@ public abstract class AbstractNewClassPage extends WizardPage {
IJavaElement initElement= clazz.getFragmentRoot();
Class[] acceptedClasses= new Class[] { IPackageFragmentRoot.class, IJavaProject.class };
TypedElementSelectionValidator validator= new TypedElementSelectionValidator(acceptedClasses, false) {
+ @Override
public boolean isSelectedValid(Object element) {
try {
if (element instanceof IJavaProject) {
@@ -293,6 +294,7 @@ public abstract class AbstractNewClassPage extends WizardPage {
acceptedClasses= new Class[] { IJavaModel.class, IPackageFragmentRoot.class, IJavaProject.class };
ViewerFilter filter= new TypedViewerFilter(acceptedClasses) {
+ @Override
public boolean select(Viewer viewer, Object parent, Object element) {
if (element instanceof IPackageFragmentRoot) {
try {
diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/AbstractNewClassWizard.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/AbstractNewClassWizard.java
index 5abe6b38..21371d9a 100644
--- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/AbstractNewClassWizard.java
+++ b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/AbstractNewClassWizard.java
@@ -24,7 +24,6 @@ import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.e4.internal.tools.wizards.classes.AbstractNewClassPage.JavaClass;
import org.eclipse.jdt.core.ICompilationUnit;
@@ -208,7 +207,7 @@ public abstract class AbstractNewClassWizard extends Wizard implements INewWizar
true, null);
} else {
file.setContents(new ByteArrayInputStream(content.getBytes()),
- IFile.FORCE | IFile.KEEP_HISTORY, null);
+ IResource.FORCE | IResource.KEEP_HISTORY, null);
}
IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(), file);
// unit.open(null);
@@ -226,7 +225,7 @@ public abstract class AbstractNewClassWizard extends Wizard implements INewWizar
true, null);
} else {
file.setContents(new ByteArrayInputStream(content.getBytes()),
- IFile.FORCE | IFile.KEEP_HISTORY, null);
+ IResource.FORCE | IResource.KEEP_HISTORY, null);
}
IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(), file);
} catch (CoreException e) {
diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/NewPartClassWizard.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/NewPartClassWizard.java
index 4de0b134..0154229d 100644
--- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/NewPartClassWizard.java
+++ b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/NewPartClassWizard.java
@@ -185,10 +185,12 @@ public class NewPartClassWizard extends AbstractNewClassWizard {
super(fragmentRoot);
}
+ @Override
public void addPropertyChangeListener(PropertyChangeListener listener) {
support.addPropertyChangeListener(listener);
}
+ @Override
public void removePropertyChangeListener(PropertyChangeListener listener) {
support.removePropertyChangeListener(listener);
}
diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/BaseApplicationModelWizard.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/BaseApplicationModelWizard.java
index 68add753..97febe37 100644
--- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/BaseApplicationModelWizard.java
+++ b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/BaseApplicationModelWizard.java
@@ -37,7 +37,6 @@ import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
@@ -67,6 +66,7 @@ public abstract class BaseApplicationModelWizard extends Wizard implements INewW
* Adding the page to the wizard.
*/
+ @Override
public void addPages() {
page = createWizardPage(selection);
addPage(page);
diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/ExtractContributionModelWizard.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/ExtractContributionModelWizard.java
index c5f3d528..4584f3cc 100644
--- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/ExtractContributionModelWizard.java
+++ b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/ExtractContributionModelWizard.java
@@ -21,9 +21,7 @@ import org.eclipse.e4.ui.model.fragment.MStringModelFragment;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
@@ -49,6 +47,7 @@ public class ExtractContributionModelWizard extends BaseApplicationModelWizard {
return "fragment.e4xmi";
}
+ @Override
protected EObject createInitialModel() {
MModelFragments createModelFragments = MFragmentFactory.INSTANCE.createModelFragments();
MStringModelFragment createStringModelFragment = MFragmentFactory.INSTANCE.createStringModelFragment();
diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/NewApplicationModelWizard.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/NewApplicationModelWizard.java
index 6f73ed3e..f4ab3393 100644
--- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/NewApplicationModelWizard.java
+++ b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/NewApplicationModelWizard.java
@@ -29,6 +29,7 @@ public class NewApplicationModelWizard extends BaseApplicationModelWizard {
return "Application.e4xmi";
}
+ @Override
protected EObject createInitialModel() {
MApplication application = MApplicationFactory.INSTANCE.createApplication();
try {
diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/NewContributionModelWizard.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/NewContributionModelWizard.java
index 3c9873e6..47bf7233 100644
--- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/NewContributionModelWizard.java
+++ b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/NewContributionModelWizard.java
@@ -22,6 +22,7 @@ public class NewContributionModelWizard extends BaseApplicationModelWizard {
return "fragment.e4xmi";
}
+ @Override
protected EObject createInitialModel() {
return (EObject) MFragmentFactory.INSTANCE.createModelFragments();
}
diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/NewModelFilePage.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/NewModelFilePage.java
index 218e7d6a..4533ca4c 100644
--- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/NewModelFilePage.java
+++ b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/NewModelFilePage.java
@@ -19,6 +19,7 @@ import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jface.dialogs.IDialogPage;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
@@ -85,6 +86,7 @@ public class NewModelFilePage extends WizardPage {
Button button = new Button(container, SWT.PUSH);
button.setText("Browse...");
button.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
handleBrowse();
}
@@ -153,7 +155,7 @@ public class NewModelFilePage extends WizardPage {
ContainerSelectionDialog dialog = new ContainerSelectionDialog(
getShell(), ResourcesPlugin.getWorkspace().getRoot(), false,
"Select new file container");
- if (dialog.open() == ContainerSelectionDialog.OK) {
+ if (dialog.open() == Window.OK) {
Object[] result = dialog.getResult();
if (result.length == 1) {
containerText.setText(((Path) result[0]).toString());
diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/E4NewProjectWizard.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/E4NewProjectWizard.java
index d803118d..492b12f2 100644
--- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/E4NewProjectWizard.java
+++ b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/E4NewProjectWizard.java
@@ -121,6 +121,7 @@ public class E4NewProjectWizard extends NewPluginProjectWizard {
fPluginData = new PluginFieldData();
}
+ @Override
public void addPages() {
fMainPage = new E4NewProjectWizardPage(
"main", fPluginData, false, getSelection()); //$NON-NLS-1$
@@ -155,6 +156,7 @@ public class E4NewProjectWizard extends NewPluginProjectWizard {
addPage(fApplicationPage);
}
+ @Override
@SuppressWarnings("restriction")
public boolean performFinish() {
try {
@@ -703,7 +705,7 @@ public class E4NewProjectWizard extends NewPluginProjectWizard {
throws CoreException {
IContainer parent = container.getParent();
if (parent instanceof IFolder) {
- prepareFolder((IFolder) parent, monitor);
+ prepareFolder(parent, monitor);
}
if (!container.exists() && container instanceof IFolder) {
IFolder folder = (IFolder) container;
@@ -711,10 +713,12 @@ public class E4NewProjectWizard extends NewPluginProjectWizard {
}
}
+ @Override
public String getPluginId() {
return fPluginData.getId();
}
+ @Override
public String getPluginVersion() {
return fPluginData.getVersion();
}
diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/NewApplicationWizardPage.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/NewApplicationWizardPage.java
index a1c24224..a248d910 100644
--- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/NewApplicationWizardPage.java
+++ b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/NewApplicationWizardPage.java
@@ -120,6 +120,7 @@ public class NewApplicationWizardPage extends WizardPage {
richSampleCheckbox.setSelection(false);
richSampleCheckbox.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
data.put(richSample, richSampleCheckbox.getSelection() ? "TRUE"
: "FALSE");
@@ -200,6 +201,7 @@ public class NewApplicationWizardPage extends WizardPage {
final Button button = new Button(parent, SWT.CHECK);
button.setSelection("true".equalsIgnoreCase(property.getValue()));
button.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
handleCheckBoxEvent(property.getName(),
button.getSelection());
@@ -227,6 +229,7 @@ public class NewApplicationWizardPage extends WizardPage {
Button button = new Button(parent, SWT.PUSH);
button.setText("...");
button.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
handleLinkEvent(property, valueText, parent.getShell());
}
diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/PluginContentPage.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/PluginContentPage.java
index 451f6706..275f1657 100644
--- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/PluginContentPage.java
+++ b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/PluginContentPage.java
@@ -170,6 +170,7 @@ public class PluginContentPage extends ContentPage {
// Set data
fEEChoice.setItems((String[]) availableEEs.toArray(new String[availableEEs.size() - 1]));
fEEChoice.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
validatePage();
}
@@ -210,6 +211,7 @@ public class PluginContentPage extends ContentPage {
fGenerateActivator = SWTFactory.createCheckButton(classGroup, PDEUIMessages.ContentPage_generate, null, false, 2);
fGenerateActivator.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
fClassLabel.setEnabled(fGenerateActivator.getSelection());
fClassText.setEnabled(fGenerateActivator.getSelection());
@@ -227,6 +229,7 @@ public class PluginContentPage extends ContentPage {
fUIPlugin = SWTFactory.createCheckButton(classGroup, PDEUIMessages.ContentPage_uicontribution, null, (settings != null) ? !settings.getBoolean(S_UI_PLUGIN) : true, 2);
fUIPlugin.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
updateData();
validatePage();
@@ -236,6 +239,7 @@ public class PluginContentPage extends ContentPage {
fApiAnalysisButton = SWTFactory.createCheckButton(classGroup, PDEUIMessages.PluginContentPage_enable_api_analysis, null, false, 2);
fApiAnalysisButton.setSelection((settings != null) ? settings.getBoolean(S_API_ANALYSIS) : false);
fApiAnalysisButton.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
updateData();
validatePage();
@@ -246,6 +250,7 @@ public class PluginContentPage extends ContentPage {
/* (non-Javadoc)
* @see org.eclipse.pde.internal.ui.wizards.plugin.ContentPage#updateData()
*/
+ @Override
public void updateData() {
super.updateData();
PluginFieldData data = (PluginFieldData) fData;
@@ -264,6 +269,7 @@ public class PluginContentPage extends ContentPage {
/* (non-Javadoc)
* @see org.eclipse.pde.internal.ui.wizards.plugin.ContentPage#setVisible(boolean)
*/
+ @Override
public void setVisible(boolean visible) {
if (visible) {
fMainPage.updateData();
@@ -323,6 +329,7 @@ public class PluginContentPage extends ContentPage {
/* (non-Javadoc)
* @see org.eclipse.pde.internal.ui.wizards.plugin.ContentPage#validatePage()
*/
+ @Override
protected void validatePage() {
String errorMessage = validateProperties();
if (errorMessage == null && fGenerateActivator.getSelection()) {
@@ -350,6 +357,7 @@ public class PluginContentPage extends ContentPage {
* Saves the current state of widgets of interest in the dialog settings for the wizard
* @param settings
*/
+ @Override
public void saveSettings(IDialogSettings settings) {
if (fGenerateActivator.isEnabled()) {
settings.put(S_GENERATE_ACTIVATOR, !fGenerateActivator.getSelection());
@@ -366,6 +374,7 @@ public class PluginContentPage extends ContentPage {
/* (non-Javadoc)
* @see org.eclipse.jface.wizard.WizardPage#canFlipToNextPage()
*/
+ @Override
public boolean canFlipToNextPage() {
if (getNextPage() instanceof TemplateListSelectionPage) {
TemplateListSelectionPage templatePage = (TemplateListSelectionPage) getNextPage();
@@ -377,6 +386,7 @@ public class PluginContentPage extends ContentPage {
/* (non-Javadoc)
* @see org.eclipse.pde.internal.ui.wizards.plugin.ContentPage#computeId()
*/
+ @Override
protected String computeId() {
String id = super.computeId();
// In addition to removed illegal characters, the xmi model does not recognize plug-in uris if they end in a version number

Back to the top