Backport some bugfixes from RCP pde in RAP pde + add workaround for
348045 preventing org.eclipse.ui.views.log build to work
diff --git a/bundles/org.eclipse.rap.pde.runtime/META-INF/MANIFEST.MF b/bundles/org.eclipse.rap.pde.runtime/META-INF/MANIFEST.MF
index 2ad73d4..68dff1c 100644
--- a/bundles/org.eclipse.rap.pde.runtime/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.rap.pde.runtime/META-INF/MANIFEST.MF
@@ -9,8 +9,8 @@
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
org.eclipse.help;bundle-version="[3.3.0,4.0.0)";resolution:=optional,
org.eclipse.rap.ui;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.rap.ui.forms;bundle-version="1.5.100",
- org.eclipse.rap.rwt.supplemental.filedialog;bundle-version="1.5.100"
+ org.eclipse.rap.ui.forms;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.rap.rwt.supplemental.filedialog;bundle-version="[1.5.100,3.0.0)"
Eclipse-LazyStart: true
Export-Package: org.eclipse.pde.internal.runtime;x-internal:=true,
org.eclipse.pde.internal.runtime.registry;x-internal:=true,
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/MessageHelper.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/MessageHelper.java
index 4ff391c..69abfa6 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/MessageHelper.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/MessageHelper.java
@@ -1,18 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
+ * Arnaud Mergey <a_mergey@yahoo.fr> - RAP port
*******************************************************************************/
package org.eclipse.pde.internal.runtime;
-import org.eclipse.osgi.service.resolver.BundleSpecification;
-import org.eclipse.osgi.service.resolver.ImportPackageSpecification;
-import org.eclipse.osgi.service.resolver.VersionConstraint;
+import org.eclipse.osgi.service.resolver.*;
import org.eclipse.osgi.util.NLS;
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/PDERuntimeMessages.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/PDERuntimeMessages.java
index 3ac460a..82f039b 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/PDERuntimeMessages.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/PDERuntimeMessages.java
@@ -6,98 +6,100 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM - Initial API and implementation
+ * IBM - Initial API and implementation
+ * Arnaud Mergey <a_mergey@yahoo.fr> - RAP port
*******************************************************************************/
package org.eclipse.pde.internal.runtime;
import org.eclipse.rap.rwt.RWT;
+
public class PDERuntimeMessages {
- private static final String BUNDLE_NAME = "org.eclipse.pde.internal.runtime.pderuntimeresources";//$NON-NLS-1$
- public String ActiveFormEditorSection_Active_Form_Page;
- public String ActiveMenuSection_0;
- public String ActiveMenuSection_1;
- public String ActiveMenuSection_2;
- public String ActiveMenuSection_3;
- public String ActiveMenuSection_4;
- public String ActiveMenuSection_5;
- public String ActiveMenuSection_6;
- public String ActiveMenuSection_7;
- public String RegistryView_refresh_label;
- public String RegistryView_refresh_tooltip;
- public String RegistryView_collapseAll_label;
- public String RegistryView_collapseAll_tooltip;
- public String RegistryView_folders_imports;
- public String RegistryView_folders_libraries;
- public String RegistryView_folders_extensionPoints;
- public String RegistryView_folders_extensions;
- public String RegistryView_found_problems;
- public String RegistryView_showRunning_label;
- public String RegistryView_showDisabled_label;
- public String RegistryView_showAdvanced_label;
- public String RegistryView_titleSummary;
- public String RegistryView_startAction_label;
- public String RegistryView_stopAction_label;
- public String RegistryView_enableAction_label;
- public String RegistryView_diag_dialog_title;
- public String RegistryView_diagnoseAction_label;
- public String RegistryView_disableAction_label;
- public String RegistryView_no_unresolved_constraints;
- public String MessageHelper_missing_optional_required_bundle;
- public String MessageHelper_missing_required_bundle;
- public String MessageHelper_missing_imported_package;
- public String MessageHelper_missing_host;
- public String SpyDialog_title;
- public String MenuSpyDialog_title;
- public String SpyDialog_close;
- public String SpyDialog_activeShell_title;
- public String SpyDialog_activeShell_desc;
- public String SpyDialog_activePart_title;
- public String SpyDialog_activePart_desc;
- public String SpyDialog_activeWizard_title;
- public String SpyDialog_activeWizard_desc;
- public String SpyDialog_activeMenuIds;
- public String SpyDialog_contributingPluginId_title;
- public String SpyDialog_contributingPluginId_desc;
- public String SpyDialog_activeSelection_title;
- public String SpyDialog_activeSelection_desc;
- public String SpyDialog_activeSelectionInterfaces_desc;
- public String SpyDialog_activeSelectedElementsCount_desc;
- public String SpyDialog_activeSelectedElement_desc;
- public String SpyDialog_activeSelectedElementInterfaces_desc;
- public String SpyDialog_activeDialogPageSection_title;
- public String SpyDialog_activeDialogPageSection_title2;
- public String SpyDialog_activeDialogPageSection_desc;
- public String SpyDialog_activeHelpSection_title;
- public String SpyDialog_activeHelpSection_desc;
- public String SpyIDEUtil_noSourceFound_title;
- public String SpyIDEUtil_noSourceFound_message;
- public String SpyDialog_activePageBook_title;
- public String SpyFormToolkit_saveImageAs_title;
- public String SpyFormToolkit_copyQualifiedName;
- public String RegistryBrowser_Bundle;
- public String RegistryBrowser_copy_label;
- public String RegistryBrowser_ExtensionPoint;
- public String RegistryBrowser_extensionPoints;
- public String RegistryBrowser_GroupBy;
- public String RegistryBrowser_InitializingView;
- public String RegistryBrowser_plugins;
- public String RegistryBrowser_Service;
- public String RegistryBrowser_Services;
- public String RegistryBrowserLabelProvider_contributedBy;
- public String RegistryBrowserLabelProvider_ExportedPackages;
- public String RegistryBrowserLabelProvider_Fragments;
- public String RegistryBrowserLabelProvider_ImportedPackages;
- public String RegistryBrowserLabelProvider_Properties;
- public String RegistryBrowserLabelProvider_RegisteredBy;
- public String RegistryBrowserLabelProvider_usedServices;
- public String RegistryBrowserLabelProvider_registeredServices;
- public String RegistryBrowserLabelProvider_UsingBundles;
+ private static final String BUNDLE_NAME = "org.eclipse.pde.internal.runtime.pderuntimeresources";//$NON-NLS-1$
+ public String ActiveFormEditorSection_Active_Form_Page;
+ public String ActiveMenuSection_0;
+ public String ActiveMenuSection_1;
+ public String ActiveMenuSection_2;
+ public String ActiveMenuSection_3;
+ public String ActiveMenuSection_4;
+ public String ActiveMenuSection_5;
+ public String ActiveMenuSection_6;
+ public String ActiveMenuSection_7;
+ public String RegistryView_refresh_label;
+ public String RegistryView_refresh_tooltip;
+ public String RegistryView_collapseAll_label;
+ public String RegistryView_collapseAll_tooltip;
+ public String RegistryView_folders_imports;
+ public String RegistryView_folders_libraries;
+ public String RegistryView_folders_extensionPoints;
+ public String RegistryView_folders_extensions;
+ public String RegistryView_found_problems;
+ public String RegistryView_showRunning_label;
+ public String RegistryView_showDisabled_label;
+ public String RegistryView_showAdvanced_label;
+ public String RegistryView_titleSummary;
+ public String RegistryView_startAction_label;
+ public String RegistryView_stopAction_label;
+ public String RegistryView_enableAction_label;
+ public String RegistryView_diag_dialog_title;
+ public String RegistryView_diagnoseAction_label;
+ public String RegistryView_disableAction_label;
+ public String RegistryView_no_unresolved_constraints;
+ public String MessageHelper_missing_optional_required_bundle;
+ public String MessageHelper_missing_required_bundle;
+ public String MessageHelper_missing_imported_package;
+ public String MessageHelper_missing_host;
+ public String SpyDialog_title;
+ public String MenuSpyDialog_title;
+ public String SpyDialog_close;
+ public String SpyDialog_activeShell_title;
+ public String SpyDialog_activeShell_desc;
+ public String SpyDialog_activePart_title;
+ public String SpyDialog_activePart_desc;
+ public String SpyDialog_activeWizard_title;
+ public String SpyDialog_activeWizard_desc;
+ public String SpyDialog_activeMenuIds;
+ public String SpyDialog_contributingPluginId_title;
+ public String SpyDialog_contributingPluginId_desc;
+ public String SpyDialog_activeSelection_title;
+ public String SpyDialog_activeSelection_desc;
+ public String SpyDialog_activeSelectionInterfaces_desc;
+ public String SpyDialog_activeSelectedElementsCount_desc;
+ public String SpyDialog_activeSelectedElement_desc;
+ public String SpyDialog_activeSelectedElementInterfaces_desc;
+ public String SpyDialog_activeDialogPageSection_title;
+ public String SpyDialog_activeDialogPageSection_title2;
+ public String SpyDialog_activeDialogPageSection_desc;
+ public String SpyDialog_activeHelpSection_title;
+ public String SpyDialog_activeHelpSection_desc;
+ public String SpyIDEUtil_noSourceFound_title;
+ public String SpyIDEUtil_noSourceFound_message;
+ public String SpyDialog_activePageBook_title;
+ public String SpyFormToolkit_saveImageAs_title;
+ public String SpyFormToolkit_copyQualifiedName;
+ public String RegistryBrowser_Bundle;
+ public String RegistryBrowser_copy_label;
+ public String RegistryBrowser_ExtensionPoint;
+ public String RegistryBrowser_extensionPoints;
+ public String RegistryBrowser_GroupBy;
+ public String RegistryBrowser_InitializingView;
+ public String RegistryBrowser_plugins;
+ public String RegistryBrowser_Service;
+ public String RegistryBrowser_Services;
+ public String RegistryBrowserLabelProvider_contributedBy;
+ public String RegistryBrowserLabelProvider_ExportedPackages;
+ public String RegistryBrowserLabelProvider_Fragments;
+ public String RegistryBrowserLabelProvider_ImportedPackages;
+ public String RegistryBrowserLabelProvider_Properties;
+ public String RegistryBrowserLabelProvider_RegisteredBy;
+ public String RegistryBrowserLabelProvider_usedServices;
+ public String RegistryBrowserLabelProvider_registeredServices;
+ public String RegistryBrowserLabelProvider_UsingBundles;
- public static PDERuntimeMessages get() {
- Class clazz = PDERuntimeMessages.class;
- Object result = RWT.NLS.getISO8859_1Encoded(BUNDLE_NAME, clazz);
- return (PDERuntimeMessages) result;
- }
+ public static PDERuntimeMessages get() {
+ Class clazz = PDERuntimeMessages.class;
+ Object result = RWT.NLS.getISO8859_1Encoded( BUNDLE_NAME, clazz );
+ return ( PDERuntimeMessages )result;
+ }
}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/PDERuntimePlugin.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/PDERuntimePlugin.java
index 161992f..e42fbc3 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/PDERuntimePlugin.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/PDERuntimePlugin.java
@@ -1,12 +1,13 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
+ * Arnaud Mergey <a_mergey@yahoo.fr> - RAP port
*******************************************************************************/
package org.eclipse.pde.internal.runtime;
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/PDERuntimePluginImages.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/PDERuntimePluginImages.java
index 91d81a3..728fa7d 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/PDERuntimePluginImages.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/PDERuntimePluginImages.java
@@ -1,12 +1,13 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
+ * Arnaud Mergey <a_mergey@yahoo.fr> - RAP port
*******************************************************************************/
package org.eclipse.pde.internal.runtime;
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryBrowserLabelProvider.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryBrowserLabelProvider.java
index 7cf491e..be8fca7 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryBrowserLabelProvider.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryBrowserLabelProvider.java
@@ -1,12 +1,13 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
+ * Arnaud Mergey <a_mergey@yahoo.fr> - RAP port
*******************************************************************************/
package org.eclipse.pde.internal.runtime.registry;
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/LocalRegistryBackend.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/LocalRegistryBackend.java
index edb2150..a6b0aa2 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/LocalRegistryBackend.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/LocalRegistryBackend.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * Copyright (c) 2008, 2012 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
@@ -164,7 +164,11 @@
if( monitor.isCanceled() )
return;
ServiceRegistration service = createServiceReferenceAdapter( references[ i ] );
- listener.addService( service );
+ // The list of registered services is volatile, avoid adding unregistered services to the
+// listener
+ if( service.getBundle() != null ) {
+ listener.addService( service );
+ }
}
}
@@ -263,7 +267,10 @@
private ServiceRegistration createServiceReferenceAdapter( ServiceReference ref ) {
ServiceRegistration service = new ServiceRegistration();
service.setId( ( ( Long )ref.getProperty( org.osgi.framework.Constants.SERVICE_ID ) ).longValue() );
- service.setBundle( ref.getBundle().getSymbolicName() );
+ org.osgi.framework.Bundle bundle = ref.getBundle();
+ if( bundle != null ) {
+ service.setBundle( bundle.getSymbolicName() );
+ }
org.osgi.framework.Bundle[] usingBundles = ref.getUsingBundles();
long[] usingBundlesIds = null;
if( usingBundles != null ) {
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/RegistryModel.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/RegistryModel.java
index bf8fd7a..03a61ac 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/RegistryModel.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/RegistryModel.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 20012 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
@@ -262,10 +262,12 @@
public ServiceRegistration[] getServices( String[] classes ) {
List result = new ArrayList();
- for( Iterator i = services.values().iterator(); i.hasNext(); ) {
- ServiceRegistration sr = ( ServiceRegistration )i.next();
- if( Arrays.equals( classes, sr.getName().getClasses() ) )
- result.add( sr );
+ synchronized( services ) {
+ for( Iterator i = services.values().iterator(); i.hasNext(); ) {
+ ServiceRegistration sr = ( ServiceRegistration )i.next();
+ if( Arrays.equals( classes, sr.getName().getClasses() ) )
+ result.add( sr );
+ }
}
return ( ServiceRegistration[] )result.toArray( new ServiceRegistration[ result.size() ] );
}
@@ -296,11 +298,13 @@
}
public Bundle getBundle( String symbolicName, String versionRange ) {
- for( Iterator i = bundles.values().iterator(); i.hasNext(); ) {
- Bundle bundle = ( Bundle )i.next();
- if( bundle.getSymbolicName().equals( symbolicName ) ) {
- if( versionMatches( bundle.getVersion(), versionRange ) )
- return bundle;
+ synchronized( bundles ) {
+ for( Iterator i = bundles.values().iterator(); i.hasNext(); ) {
+ Bundle bundle = ( Bundle )i.next();
+ if( bundle.getSymbolicName().equals( symbolicName ) ) {
+ if( versionMatches( bundle.getVersion(), versionRange ) )
+ return bundle;
+ }
}
}
return null;
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/SpyFormToolkit.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/SpyFormToolkit.java
index 8bffbd3..23be9bf 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/SpyFormToolkit.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/SpyFormToolkit.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 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
@@ -9,42 +9,26 @@
* Chris Aniszczyk <zx@us.ibm.com> - initial API and implementation
* Willian Mitsuda <wmitsuda@gmail.com> - bug 209841
* Benjamin Cabe <benjamin.cabe@anyware-tech.com> - bug 209487
+ * Arnaud Mergey <a_mergey@yahoo.fr> - RAP port
*******************************************************************************/
package org.eclipse.pde.internal.runtime.spy;
import java.util.HashMap;
import java.util.Map;
-
import org.eclipse.help.IContext;
import org.eclipse.help.internal.context.Context;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.ToolBarManager;
import org.eclipse.jface.dialogs.PopupDialog;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.pde.internal.runtime.PDERuntimeMessages;
-import org.eclipse.pde.internal.runtime.PDERuntimePlugin;
-import org.eclipse.pde.internal.runtime.PDERuntimePluginImages;
+import org.eclipse.pde.internal.runtime.*;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.MenuAdapter;
-import org.eclipse.swt.events.MenuEvent;
-import org.eclipse.swt.graphics.Cursor;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.ImageLoader;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.MenuItem;
-import org.eclipse.swt.widgets.ToolBar;
-import org.eclipse.swt.widgets.Widget;
+import org.eclipse.swt.events.*;
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.widgets.*;
import org.eclipse.ui.forms.events.HyperlinkAdapter;
import org.eclipse.ui.forms.events.HyperlinkEvent;
-import org.eclipse.ui.forms.widgets.FormText;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.forms.widgets.*;
import org.osgi.framework.Bundle;
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/dialogs/SpyDialog.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/dialogs/SpyDialog.java
index 1c0f71f..db9cd6b 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/dialogs/SpyDialog.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/dialogs/SpyDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 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
@@ -8,6 +8,7 @@
* Contributors:
* Chris Aniszczyk <zx@us.ibm.com> - initial API and implementation
* Benjamin Cabe <benjamin.cabe@anyware-tech.com> - bug 211580
+ * Arnaud Mergey <a_mergey@yahoo.fr> - RAP port
*******************************************************************************/
package org.eclipse.pde.internal.runtime.spy.dialogs;
@@ -15,25 +16,12 @@
import org.eclipse.jface.action.Action;
import org.eclipse.jface.dialogs.PopupDialog;
import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.pde.internal.runtime.IHelpContextIds;
-import org.eclipse.pde.internal.runtime.PDERuntimeMessages;
-import org.eclipse.pde.internal.runtime.PDERuntimePluginImages;
+import org.eclipse.pde.internal.runtime.*;
import org.eclipse.pde.internal.runtime.spy.SpyFormToolkit;
-import org.eclipse.pde.internal.runtime.spy.sections.ActiveDialogPageSection;
-import org.eclipse.pde.internal.runtime.spy.sections.ActiveFormEditorSection;
-import org.eclipse.pde.internal.runtime.spy.sections.ActiveHelpSection;
-import org.eclipse.pde.internal.runtime.spy.sections.ActivePartSection;
-import org.eclipse.pde.internal.runtime.spy.sections.ActiveSelectionSection;
-import org.eclipse.pde.internal.runtime.spy.sections.ActiveShellSection;
-import org.eclipse.pde.internal.runtime.spy.sections.ActiveWizardSection;
-import org.eclipse.pde.internal.runtime.spy.sections.ISpySection;
+import org.eclipse.pde.internal.runtime.spy.sections.*;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.widgets.*;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.forms.widgets.ScrolledForm;
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveFormEditorSection.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveFormEditorSection.java
index 28fdab7..c742c25 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveFormEditorSection.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveFormEditorSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008 Code 9 Corporation and others.
+ * Copyright (c) 2008, 2012 Code 9 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
@@ -8,6 +8,7 @@
* Contributors:
* Code 9 Corporation - initial API and implementation
* Ketan Padegaonkar <KetanPadegaonkar@gmail.com> - bug 241912
+ * Tomasz Zarna <tomasz.zarna@tasktop.com> - bug 299298
*******************************************************************************/
package org.eclipse.pde.internal.runtime.spy.sections;
@@ -35,6 +36,8 @@
if( object == null )
return;
IFormPage activePage = multiEditor.getActivePageInstance();
+ if( activePage == null )
+ return;
Section section = toolkit.createSection( form.getBody(), ExpandableComposite.TITLE_BAR );
section.setText( PDERuntimeMessages.get().ActiveFormEditorSection_Active_Form_Page );
FormText text = toolkit.createFormText( section, true );
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveSelectionSection.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveSelectionSection.java
index b4ccd1e..086c781 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveSelectionSection.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveSelectionSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 20012 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
@@ -10,19 +10,15 @@
*******************************************************************************/
package org.eclipse.pde.internal.runtime.spy.sections;
-import org.eclipse.osgi.util.NLS;
-
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.pde.internal.runtime.PDERuntimeMessages;
import org.eclipse.pde.internal.runtime.spy.SpyFormToolkit;
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-import org.eclipse.ui.forms.widgets.FormText;
-import org.eclipse.ui.forms.widgets.ScrolledForm;
-import org.eclipse.ui.forms.widgets.Section;
-import org.eclipse.ui.forms.widgets.TableWrapData;
+import org.eclipse.ui.forms.widgets.*;
import org.eclipse.ui.handlers.HandlerUtil;
@@ -38,7 +34,8 @@
return;
// analyze the selection
ISelection selection = HandlerUtil.getCurrentSelection( event );
- if( selection != null ) {
+ Shell shell = HandlerUtil.getActiveShell( event );
+ if( selection != null && window.getShell() == shell ) {
Section section = toolkit.createSection( form.getBody(), ExpandableComposite.TITLE_BAR );
section.clientVerticalSpacing = 9;
section.setText( PDERuntimeMessages.get().SpyDialog_activeSelection_title );
diff --git a/bundles/org.eclipse.rap.ui.views.log/META-INF/MANIFEST.MF b/bundles/org.eclipse.rap.ui.views.log/META-INF/MANIFEST.MF
index 3154ef1..bdb30db 100644
--- a/bundles/org.eclipse.rap.ui.views.log/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.rap.ui.views.log/META-INF/MANIFEST.MF
@@ -6,8 +6,8 @@
Bundle-Activator: org.eclipse.ui.internal.views.log.Activator
Bundle-Vendor: %provider-name
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.rap.ui;bundle-version="2.0.0",
- org.eclipse.rap.rwt.supplemental.filedialog;bundle-version="1.5.100"
+ org.eclipse.rap.ui;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.rap.rwt.supplemental.filedialog;bundle-version="[1.5.100,3.0.0)"
Eclipse-LazyStart: true
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.rap.ui.views.log/pom.xml b/bundles/org.eclipse.rap.ui.views.log/pom.xml
index cfc06c2..ea4f8f7 100644
--- a/bundles/org.eclipse.rap.ui.views.log/pom.xml
+++ b/bundles/org.eclipse.rap.ui.views.log/pom.xml
@@ -1,27 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (C) 2012 EclipseSource and others.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+<!-- Copyright (C) 2012 EclipseSource and others. All rights reserved. This
+ program and the accompanying materials are made available under the terms
+ of the Eclipse Public License v1.0 which accompanies this distribution, and
+ is available at http://www.eclipse.org/legal/epl-v10.html Contributors: EclipseSource
+ - initial implementation -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
- Contributors:
- EclipseSource - initial implementation
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.rap.incubator</groupId>
+ <artifactId>org.eclipse.rap.incubator-parent</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ <relativePath>../../../org.eclipse.rap.incubator.releng/releng/org.eclipse.rap.incubator.releng/parent</relativePath>
+ </parent>
- <parent>
- <groupId>org.eclipse.rap.incubator</groupId>
- <artifactId>org.eclipse.rap.incubator-parent</artifactId>
- <version>0.1.0-SNAPSHOT</version>
- <relativePath>../../../org.eclipse.rap.incubator.releng/releng/org.eclipse.rap.incubator.releng/parent</relativePath>
- </parent>
+ <artifactId>org.eclipse.rap.ui.views.log</artifactId>
+ <packaging>eclipse-plugin</packaging>
- <artifactId>org.eclipse.rap.ui.views.log</artifactId>
- <packaging>eclipse-plugin</packaging>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <filters>
+ <filter>
+ <type>p2-installable-unit</type>
+ <id>org.eclipse.equinox.servletbridge.extensionbundle</id>
+ <removeAll />
+ </filter>
+ </filters>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
diff --git a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/DownloadServiceHandler.java b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/DownloadServiceHandler.java
index 9a56e3c..af98935 100644
--- a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/DownloadServiceHandler.java
+++ b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/DownloadServiceHandler.java
@@ -1,6 +1,13 @@
-/**
- *
- */
+/*******************************************************************************
+ * Copyright (c) 2013 Arnaud Mergey {OTHER COPYRIGHT OWNERS}.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Arnaud Mergey <a_mergey@yahoo.fr> - initial API and implementation and/or initial documentation
+ *******************************************************************************/
package org.eclipse.ui.internal.views.log;
import java.io.*;
diff --git a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/IHelpContextIds.java b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/IHelpContextIds.java
index 71192e3..c8ff1ac 100644
--- a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/IHelpContextIds.java
+++ b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/IHelpContextIds.java
@@ -1,20 +1,20 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.internal.views.log;
-
-public interface IHelpContextIds {
-
- public static final String PREFIX = "org.eclipse.pde.doc.user" + "."; //$NON-NLS-1$ //$NON-NLS-2$
- public static final String LOG_VIEW = PREFIX + "log_view"; //$NON-NLS-1$
- public static final String LOG_EVENTDETAILS = PREFIX + "log_eventdetails"; //$NON-NLS-1$
- public static final String LOG_FILTER = PREFIX + "log_filter"; //$NON-NLS-1$
-
-}
+/*******************************************************************************
+ * Copyright (c) 2007, 2012 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.views.log;
+
+public interface IHelpContextIds {
+
+ public static final String PREFIX = "org.eclipse.ui."; //$NON-NLS-1$ //$NON-NLS-2$
+ public static final String LOG_VIEW = PREFIX + "error_log"; //$NON-NLS-1$
+ public static final String LOG_EVENTDETAILS = PREFIX + "log_eventdetails"; //$NON-NLS-1$
+ public static final String LOG_FILTER = PREFIX + "log_filter"; //$NON-NLS-1$
+
+}
diff --git a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogSession.java b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogSession.java
index 1588c51..c082c96 100644
--- a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogSession.java
+++ b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogSession.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 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
@@ -9,6 +9,7 @@
* IBM Corporation - initial API and implementation
* Jacek Pospychala <jacek.pospychala@pl.ibm.com> - bugs 202583, 207344
* Benjamin Cabe <benjamin.cabe@anyware-tech.com> - bug 218648
+ * Arnaud Mergey <a_mergey@yahoo.fr> - RAP port
*******************************************************************************/
package org.eclipse.ui.internal.views.log;
diff --git a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogView.java b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogView.java
index 2cf93a0..d636b04 100644
--- a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogView.java
+++ b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogView.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,6 +12,7 @@
* bugs 172658, 216341, 216657
* Benjamin Cabe <benjamin.cabe@anyware-tech.com> - bug 218648
* Tuukka Lehtonen <tuukka.lehtonen@semantum.fi> - bug 247907
+ * Arnaud Mergey <a_mergey@yahoo.fr> - RAP port
*******************************************************************************/
package org.eclipse.ui.internal.views.log;
@@ -1065,10 +1066,12 @@
fOpenLogAction.setEnabled(fInputFile.exists());
fExportLogAction.setEnabled(fInputFile.exists());
fExportLogEntryAction.setEnabled(!viewer.getSelection().isEmpty());
- if (activate && fActivateViewAction.isChecked()) {
- IWorkbenchPage page = Activator.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
- if (page != null)
+ IWorkbenchWindow window = Activator.getDefault().getWorkbench().getActiveWorkbenchWindow();
+ if (window != null) {
+ IWorkbenchPage page = window.getActivePage();
+ if (page != null) {
page.bringToTop(view);
+ }
}
}
}
diff --git a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogViewLabelProvider.java b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogViewLabelProvider.java
index 8e23667..0584b26 100644
--- a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogViewLabelProvider.java
+++ b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogViewLabelProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 20012 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
@@ -9,6 +9,7 @@
* IBM Corporation - initial API and implementation
* EclipseSource Corporation - ongoing enhancements
* Jacek Pospychala <jacek.pospychala@pl.ibm.com> - bugs 202583, 207344, 207101
+ * Arnaud Mergey <a_mergey@yahoo.fr> - RAP port
*******************************************************************************/
package org.eclipse.ui.internal.views.log;
diff --git a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/Messages.java b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/Messages.java
index d615563..5ed4ced 100644
--- a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/Messages.java
+++ b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/Messages.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 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
@@ -9,6 +9,7 @@
* IBM Corporation - initial API and implementation
* Jacek Pospychala <jacek.pospychala@pl.ibm.com> - bugs 202583, 207344
* Benjamin Cabe <benjamin.cabe@anyware-tech.com> - bug 218648
+ * Arnaud Mergey <a_mergey@yahoo.fr> - RAP port
*******************************************************************************/
package org.eclipse.ui.internal.views.log;