summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCurtis Windatt2013-05-10 16:27:59 (EDT)
committerGerrit Code Review @ Eclipse.org2013-05-14 14:10:42 (EDT)
commitbc71103db235c90ccb72a4b7601812591beec90c (patch)
tree4ba02320b905cca8c746f69b2e70dd0459ceb33d
parent75cf6376f2d2229359eba2935d02ea5cfd852c95 (diff)
downloadeclipse.pde.ui-bc71103db235c90ccb72a4b7601812591beec90c.zip
eclipse.pde.ui-bc71103db235c90ccb72a4b7601812591beec90c.tar.gz
eclipse.pde.ui-bc71103db235c90ccb72a4b7601812591beec90c.tar.bz2
Bug 407755 - More forceful wording about adding OSGi bundle manifest inrefs/changes/26/12726/2
manifest editor Change-Id: Ie73b675537950e4b9366cc6d6e14013a2afff0b5
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDEUIMessages.java4
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/OverviewPage.java35
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/pderesources.properties7
3 files changed, 36 insertions, 10 deletions
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDEUIMessages.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDEUIMessages.java
index 7b882c1..301280e 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDEUIMessages.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDEUIMessages.java
@@ -2168,6 +2168,10 @@ public class PDEUIMessages extends NLS {
public static String OverviewPage_fExtensionContent;
+ public static String OverviewPage_ManifestWarning;
+ public static String OverviewPage_WarnAboutMissingManifest;
+ public static String OverviewPage_WarnAboutMissingManifestFragment;
+
public static String OverwriteProjectsSelectionDialog_0;
public static String BaseBlock_dirSelection;
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/OverviewPage.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/OverviewPage.java
index 3f72007..d1c605f 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/OverviewPage.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/OverviewPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -12,9 +12,8 @@ package org.eclipse.pde.internal.ui.editor.plugin;
import java.lang.reflect.InvocationTargetException;
import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.core.runtime.*;
+import org.eclipse.jface.dialogs.*;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.window.Window;
@@ -38,6 +37,7 @@ import org.eclipse.ui.forms.events.HyperlinkEvent;
import org.eclipse.ui.forms.widgets.*;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.progress.IProgressService;
+import org.eclipse.ui.progress.UIJob;
import org.osgi.service.prefs.BackingStoreException;
public class OverviewPage extends LaunchShortcutOverviewPage {
@@ -70,6 +70,23 @@ public class OverviewPage extends LaunchShortcutOverviewPage {
form.setText(PDEUIMessages.ManifestEditor_OverviewPage_title);
fillBody(managedForm, toolkit);
PlatformUI.getWorkbench().getHelpSystem().setHelp(form.getBody(), IHelpContextIds.MANIFEST_PLUGIN_OVERVIEW);
+
+ // Add warning about missing manifest (Bug 407755)
+ if (!isBundle() && isEditable()) {
+ // We have to use a job so that the form header has been created
+ UIJob messageJob = new UIJob(PDEUIMessages.OverviewPage_ManifestWarning) {
+ @Override
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+ IManagedForm form = getManagedForm();
+ if (form != null) {
+ form.getMessageManager().addMessage(PDEUIMessages.OverviewPage_ManifestWarning, isFragment() ? PDEUIMessages.OverviewPage_WarnAboutMissingManifestFragment : PDEUIMessages.OverviewPage_WarnAboutMissingManifest, null, IMessageProvider.WARNING);
+ }
+ return Status.OK_STATUS;
+ }
+ };
+ messageJob.setSystem(true);
+ messageJob.schedule();
+ }
}
private void fillBody(IManagedForm managedForm, FormToolkit toolkit) {
@@ -111,10 +128,7 @@ public class OverviewPage extends LaunchShortcutOverviewPage {
Composite container = createStaticSectionClient(toolkit, section);
- FormText text = createClient(container, isFragment() ? PDEUIMessages.OverviewPage_fContent : PDEUIMessages.OverviewPage_content, toolkit);
PDELabelProvider lp = PDEPlugin.getDefault().getLabelProvider();
- text.setImage("page", lp.get(PDEPluginImages.DESC_PAGE_OBJ, SharedLabelProvider.F_EDIT)); //$NON-NLS-1$
-
if (!isBundle() && isEditable()) {
String content;
if (isFragment()) {
@@ -122,8 +136,13 @@ public class OverviewPage extends LaunchShortcutOverviewPage {
} else {
content = PDEUIMessages.OverviewPage_osgi;
}
- text = createClient(container, content, toolkit);
+ FormText warningText = createClient(container, content, toolkit);
+ warningText.setImage("warning", lp.get(PDEPluginImages.DESC_WARNING_ST_OBJ, 0)); //$NON-NLS-1$
}
+
+ FormText text = createClient(container, isFragment() ? PDEUIMessages.OverviewPage_fContent : PDEUIMessages.OverviewPage_content, toolkit);
+ text.setImage("page", lp.get(PDEPluginImages.DESC_PAGE_OBJ, SharedLabelProvider.F_EDIT)); //$NON-NLS-1$
+
section.setClient(container);
}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/pderesources.properties b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/pderesources.properties
index 0402dd0..5892213 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/pderesources.properties
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/pderesources.properties
@@ -1680,7 +1680,7 @@ OverviewPage_content=<form>\
</form>
OverviewPage_contentTitle=Content
OverviewPage_osgi = <form>\
-<p>For this plug-in to take advantage of additional runtime capabilities, <a href="action.convert">create an OSGi bundle manifest</a>.</p>\
+<li style="image" value="warning">For this plug-in to be able to run in future releases, you must <a href="action.convert">create an OSGi bundle manifest</a>.</li>\
</form>
OverviewPage_testing=<form>\
<p>Test this plug-in by launching a separate Eclipse application:</p>{0}</form>
@@ -1696,7 +1696,7 @@ OverviewPage_deploying=<form>\
<li style="text" value="4." bindent="5">Export the plug-in in a format suitable for deployment using the <a href="export">Export Wizard</a></li>\
</form>
OverviewPage_fOsgi = <form>\
-<p>For this fragment to take advantage of additional runtime capabilities, you need to <a href="action.convert">create an OSGi bundle manifest</a>.</p>\
+<li style="image" value="warning">For this fragment to be able to run in future releases, you must <a href="action.convert">create an OSGi bundle manifest</a>.</li>\
</form>
OverviewPage_error=Error
OverviewPage_fContent=<form>\
@@ -1732,6 +1732,9 @@ OverviewPage_contentDescription=<form>\
<p>The <a href="content">Content</a> section specifies the set of plug-ins that will be included in the target platform.</p>\
</form>
OverviewPage_buildTitle=Build Configuration
+OverviewPage_ManifestWarning=Manifest warning
+OverviewPage_WarnAboutMissingManifest=You must create an OSGi bundle manifest to run this plug-in in future releases.
+OverviewPage_WarnAboutMissingManifestFragment=You must create an OSGi bundle manifest to run this fragment in future releases.
OverwriteProjectsSelectionDialog_0=&Projects to delete:
ClassAttributeRow_dialogTitle=Select Type
ArchivePage_title=Description and Archives