Merge remote-tracking branch 'origin/master' into BETA_JAVA16
diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml
index de3480c..0ba8158 100644
--- a/.mvn/extensions.xml
+++ b/.mvn/extensions.xml
@@ -3,6 +3,6 @@
<extension>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-pomless</artifactId>
- <version>2.1.0</version>
+ <version>2.2.0</version>
</extension>
</extensions>
\ No newline at end of file
diff --git a/apitools/org.eclipse.pde.api.tools.ee.feature/feature.properties b/apitools/org.eclipse.pde.api.tools.ee.feature/feature.properties
index 3a5b369..82d70f1 100644
--- a/apitools/org.eclipse.pde.api.tools.ee.feature/feature.properties
+++ b/apitools/org.eclipse.pde.api.tools.ee.feature/feature.properties
@@ -25,8 +25,7 @@
# "description" property - description of the feature
description=This feature provides API Tools Execution Environment Descriptions for the following environments:\n\
-JRE-1.1, J2SE-1.2, J2SE-1.3, J2SE-1.4, J2SE-1.5, JavaSE-1.6, JavaSE-1.7, JavaSE-1.8, CDC-1.0/Foundation-1.0, \n\
-CDC-1.1/Foundation-1.1, OSGi/Minimum-1.0, OSGi/Minimum-1.1, OSGi/Minimum-1.2
+CDC-1.0/Foundation-1.0, CDC-1.1/Foundation-1.1, OSGi/Minimum-1.0, OSGi/Minimum-1.1, OSGi/Minimum-1.2
# "copyright" property - text of the "Feature Update Copyright"
copyright=\
diff --git a/apitools/org.eclipse.pde.api.tools.tests/META-INF/MANIFEST.MF b/apitools/org.eclipse.pde.api.tools.tests/META-INF/MANIFEST.MF
index 696f42b..6fcb143 100644
--- a/apitools/org.eclipse.pde.api.tools.tests/META-INF/MANIFEST.MF
+++ b/apitools/org.eclipse.pde.api.tools.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.pde.api.tools.tests
-Bundle-Version: 1.2.100.qualifier
+Bundle-Version: 1.2.200.qualifier
Bundle-Vendor: %Bundle-Vendor
Require-Bundle: org.eclipse.core.runtime,
org.junit,
diff --git a/apitools/org.eclipse.pde.api.tools.tests/pom.xml b/apitools/org.eclipse.pde.api.tools.tests/pom.xml
index 306133b..45fbb21 100644
--- a/apitools/org.eclipse.pde.api.tools.tests/pom.xml
+++ b/apitools/org.eclipse.pde.api.tools.tests/pom.xml
@@ -19,7 +19,7 @@
</parent>
<groupId>org.eclipse.pde</groupId>
<artifactId>org.eclipse.pde.api.tools.tests</artifactId>
- <version>1.2.100-SNAPSHOT</version>
+ <version>1.2.200-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
<build>
diff --git a/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/ApiBuilderTest.java b/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/ApiBuilderTest.java
index 75b74d0..c374125 100644
--- a/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/ApiBuilderTest.java
+++ b/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/ApiBuilderTest.java
@@ -819,6 +819,7 @@
inode.put(IApiProblemTypes.CHANGED_EXECUTION_ENV, ApiPlugin.VALUE_ERROR);
inode.put(IApiProblemTypes.MISSING_DEFAULT_API_BASELINE, ApiPlugin.VALUE_WARNING);
+ inode.put(IApiProblemTypes.MISSING_PLUGIN_IN_API_BASELINE, ApiPlugin.VALUE_IGNORE);
try {
inode.flush();
} catch (BackingStoreException e) {
diff --git a/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/usage/UsageTest.java b/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/usage/UsageTest.java
index e3d562d..0ede8fb 100644
--- a/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/usage/UsageTest.java
+++ b/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/usage/UsageTest.java
@@ -140,6 +140,7 @@
protected void setUp() throws Exception {
// If we have an existing environment, set it to revert rather than
// delete the workspace to improve performance
+ resetBuilderOptions();
ApiTestingEnvironment env = getEnv();
if (env != null) {
env.setRevert(true);
diff --git a/apitools/org.eclipse.pde.api.tools.ui/META-INF/MANIFEST.MF b/apitools/org.eclipse.pde.api.tools.ui/META-INF/MANIFEST.MF
index bb07858..8c0764f 100644
--- a/apitools/org.eclipse.pde.api.tools.ui/META-INF/MANIFEST.MF
+++ b/apitools/org.eclipse.pde.api.tools.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.pde.api.tools.ui; singleton:=true
-Bundle-Version: 1.2.100.qualifier
+Bundle-Version: 1.2.200.qualifier
Bundle-Localization: plugin
Eclipse-LazyStart: true
Bundle-ActivationPolicy: lazy
diff --git a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/ApiMarkerResolutionGenerator.java b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/ApiMarkerResolutionGenerator.java
index 045767f..3709db6 100644
--- a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/ApiMarkerResolutionGenerator.java
+++ b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/ApiMarkerResolutionGenerator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2019 IBM Corporation and others.
+ * Copyright (c) 2008, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -48,8 +48,6 @@
*/
private final IMarkerResolution[] NO_RESOLUTIONS = new IMarkerResolution[0];
-
- private InstallEEDescriptionProblemResolution installEEResolution = new InstallEEDescriptionProblemResolution();
private DefaultApiProfileResolution profileResolution = new DefaultApiProfileResolution();
@Override
@@ -59,11 +57,6 @@
}
switch (marker.getAttribute(IApiMarkerConstants.API_MARKER_ATTR_ID, -1)) {
case IApiMarkerConstants.API_USAGE_MARKER_ID: {
- int id = ApiProblemFactory.getProblemId(marker);
- if (id > -1 && ApiProblemFactory.getProblemKind(id) == IApiProblem.MISSING_EE_DESCRIPTIONS) {
- return new IMarkerResolution[] {
- installEEResolution, new ConfigureProblemSeverityForAPIToolsResolution(marker) };
- }
return new IMarkerResolution[] { new ConfigureProblemSeverityForAPIToolsResolution(marker),
new FilterProblemResolution(marker),
new FilterProblemWithCommentResolution(marker) };
diff --git a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/ConfigureProblemSeverityForAPIToolsResolution.java b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/ConfigureProblemSeverityForAPIToolsResolution.java
index 9a42be2..dfb4248 100644
--- a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/ConfigureProblemSeverityForAPIToolsResolution.java
+++ b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/ConfigureProblemSeverityForAPIToolsResolution.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2017, 2018 IBM Corporation and others.
+ * Copyright (c) 2017, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -30,6 +30,7 @@
import org.eclipse.jface.text.contentassist.IContextInformation;
import org.eclipse.pde.api.tools.internal.problems.ApiProblemFactory;
import org.eclipse.pde.api.tools.internal.provisional.IApiMarkerConstants;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IElementDescriptor;
import org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblem;
import org.eclipse.pde.api.tools.internal.util.Util;
import org.eclipse.pde.api.tools.ui.internal.ApiUIPlugin;
@@ -139,9 +140,20 @@
if (fBackingMarker.getAttribute(IApiMarkerConstants.API_MARKER_ATTR_ID,
-1) == IApiMarkerConstants.DEFAULT_API_BASELINE_MARKER_ID) {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+ int id = ApiProblemFactory.getProblemId(fBackingMarker);
+ String type =ApiBaselinePreferencePage.MISSING_BASELINE_OPTION;
+ if (id > -1) {
+ if (id == ApiProblemFactory.createProblemId(IApiProblem.CATEGORY_API_BASELINE,
+ IElementDescriptor.RESOURCE, IApiProblem.API_PLUGIN_NOT_PRESENT_IN_BASELINE,
+ IApiProblem.NO_FLAGS)) {
+ type =ApiBaselinePreferencePage.MISSING_PLUGIN_IN_BASELINE_OPTION;
+ }
+
+ }
Map<String, Object> data = new HashMap<>();
+
data.put(ApiBaselinePreferencePage.DATA_SELECT_OPTION_KEY,
- ApiBaselinePreferencePage.MISSING_BASELINE_OPTION);
+ type);
PreferencesUtil
.createPreferenceDialogOn(shell, IApiToolsConstants.ID_BASELINES_PREF_PAGE, null, data)
.open();
diff --git a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/InstallEEDescriptionProblemResolution.java b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/InstallEEDescriptionProblemResolution.java
deleted file mode 100644
index f735e2c..0000000
--- a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/InstallEEDescriptionProblemResolution.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2016 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.api.tools.ui.internal.markers;
-
-import org.eclipse.pde.api.tools.ui.internal.ApiUIPlugin;
-import org.eclipse.pde.api.tools.ui.internal.IApiToolsConstants;
-import org.eclipse.pde.api.tools.ui.internal.preferences.ApiErrorsWarningsConfigurationBlock;
-
-import org.eclipse.swt.graphics.Image;
-
-import org.eclipse.core.commands.Command;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.NotEnabledException;
-import org.eclipse.core.commands.NotHandledException;
-import org.eclipse.core.commands.common.NotDefinedException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-import org.eclipse.core.resources.IMarker;
-
-import org.eclipse.ui.IMarkerResolution2;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.commands.ICommandService;
-import org.eclipse.ui.handlers.IHandlerService;
-import org.eclipse.ui.progress.UIJob;
-
-/**
- * Problem resolution to install EE descriptions
- *
- * @since 1.0.400
- */
-public class InstallEEDescriptionProblemResolution implements IMarkerResolution2 {
-
- @Override
- public String getLabel() {
- return MarkerMessages.InstallEEDescriptionProblemResolution_0;
- }
-
- @Override
- public void run(IMarker marker) {
- UIJob job = new UIJob(MarkerMessages.DefaultApiProfileResolution_2) {
- @Override
- public IStatus runInUIThread(IProgressMonitor monitor) {
- ICommandService commandService = PlatformUI.getWorkbench().getService(ICommandService.class);
- final Command command = commandService.getCommand(ApiErrorsWarningsConfigurationBlock.P2_INSTALL_COMMAND_HANDLER);
- if (command.isHandled()) {
- IHandlerService handlerService = PlatformUI.getWorkbench().getService(IHandlerService.class);
- try {
- handlerService.executeCommand(ApiErrorsWarningsConfigurationBlock.P2_INSTALL_COMMAND_HANDLER, null);
- } catch (ExecutionException | NotDefinedException | NotEnabledException | NotHandledException ex) {
- ApiErrorsWarningsConfigurationBlock.handleCommandException();
- }
- }
- return Status.OK_STATUS;
- }
- };
- job.setSystem(true);
- job.schedule();
- }
-
- @Override
- public String getDescription() {
- return MarkerMessages.InstallEEDescriptionProblemResolution_1;
- }
-
- @Override
- public Image getImage() {
- return ApiUIPlugin.getSharedImage(IApiToolsConstants.IMG_ELCL_SETUP_APITOOLS);
- }
-}
diff --git a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/MarkerMessages.java b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/MarkerMessages.java
index 5a497c7..8159ea0 100644
--- a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/MarkerMessages.java
+++ b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/MarkerMessages.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2020 IBM Corporation and others.
+ * Copyright (c) 2008, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -44,8 +44,7 @@
public static String FilterProblemWithCommentResolution_create_commented_filters;
public static String ExplainProblemResolution_explain_incompatibility;
public static String ExplainProblemResolution_explain_incompatibility_desc;
- public static String InstallEEDescriptionProblemResolution_0;
- public static String InstallEEDescriptionProblemResolution_1;
+
public static String OpenPropertyPageResolution_element_cannot_be_null;
public static String OpenPropertyPageResolution_open_the_property_page;
diff --git a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/markermessages.properties b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/markermessages.properties
index 80f58c6..fc28f28 100644
--- a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/markermessages.properties
+++ b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/markermessages.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2008, 2020 IBM Corporation and others.
+# Copyright (c) 2008, 2021 IBM Corporation and others.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
@@ -36,8 +36,6 @@
FilterProblemWithCommentResolution_create_commented_filter=Create a commented {1} problem filter for ''{0}''
FilterProblemWithCommentResolution_create_commented_filter_desc=Creates a {1} problem filter with comment for API tools problem:<br> <br> {0}
FilterProblemWithCommentResolution_create_commented_filters=Create commented filters for the selected problems
-InstallEEDescriptionProblemResolution_0=Install execution environment descriptions
-InstallEEDescriptionProblemResolution_1=Navigate to the install software dialog to install execution environment descriptions
OpenPropertyPageResolution_element_cannot_be_null=The given element cannot be null
OpenPropertyPageResolution_open_the_property_page=Open the {0} property page
diff --git a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiBaselinePreferencePage.java b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiBaselinePreferencePage.java
index 944d56a..150e135 100644
--- a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiBaselinePreferencePage.java
+++ b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiBaselinePreferencePage.java
@@ -68,6 +68,7 @@
public static final String DATA_SELECT_OPTION_KEY = "select_option_key"; //$NON-NLS-1$
public static final String MISSING_BASELINE_OPTION = "MISSING_BASELINE_OPTION"; //$NON-NLS-1$
+ public static final String MISSING_PLUGIN_IN_BASELINE_OPTION = "MISSING_PLUGIN_IN_BASELINE_OPTION"; //$NON-NLS-1$
public static final String ID = "org.eclipse.pde.api.tools.ui.apiprofiles.prefpage"; //$NON-NLS-1$
/**
@@ -437,7 +438,10 @@
if (key instanceof String) {
String option = (String) key;
if (option.equals(ApiBaselinePreferencePage.MISSING_BASELINE_OPTION)) {
- block.selectOption();
+ block.selectOption(0);
+ }
+ if (option.equals(ApiBaselinePreferencePage.MISSING_PLUGIN_IN_BASELINE_OPTION)) {
+ block.selectOption(1);
}
}
}
diff --git a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiBaselinesConfigurationBlock.java b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiBaselinesConfigurationBlock.java
index bbd9a17..4783a2a 100644
--- a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiBaselinesConfigurationBlock.java
+++ b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiBaselinesConfigurationBlock.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2019 IBM Corporation and others.
+ * Copyright (c) 2007, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -208,10 +208,11 @@
private static final Key KEY_MISSING_DEFAULT_API_PROFILE = getApiToolsKey(IApiProblemTypes.MISSING_DEFAULT_API_BASELINE);
+ private static final Key KEY_PLUGIN_MISSING_IN_BASELINE = getApiToolsKey(IApiProblemTypes.MISSING_PLUGIN_IN_API_BASELINE);
/**
* An array of all of the keys for the page
*/
- private static Key[] fgAllKeys = { KEY_MISSING_DEFAULT_API_PROFILE };
+ private static Key[] fgAllKeys = { KEY_MISSING_DEFAULT_API_PROFILE, KEY_PLUGIN_MISSING_IN_BASELINE };
/**
* Constant representing the severity values presented in the combo boxes
@@ -249,11 +250,12 @@
/**
* Listing of all of the {@link Combo}s added to the block
*/
- private Combo fCombo = null;
+
+ private ArrayList<Combo> fCombos = new ArrayList<>();
/**
* Listing of the label in the block
*/
- private Label fLabel = null;
+ private ArrayList<Label> fLabels = new ArrayList<>();
/**
* The context of settings locations to search for values in
@@ -307,7 +309,14 @@
fParent = parent;
fMainComp = SWTFactory.createComposite(parent, 1, 1, GridData.FILL_HORIZONTAL, 0, 0);
Group optionsProfileGroup = SWTFactory.createGroup(fMainComp, PreferenceMessages.ApiProfilesConfigurationBlock_options_group_title, 2, 1, GridData.FILL_BOTH);
- this.fCombo = createComboControl(optionsProfileGroup, PreferenceMessages.ApiProfilesConfigurationBlock_missing_default_api_profile_message, KEY_MISSING_DEFAULT_API_PROFILE);
+ Combo combo = createComboControl(optionsProfileGroup,
+ PreferenceMessages.ApiProfilesConfigurationBlock_missing_default_api_profile_message,
+ KEY_MISSING_DEFAULT_API_PROFILE);
+ fCombos.add(combo);
+ combo = createComboControl(optionsProfileGroup,
+ PreferenceMessages.ApiProfilesConfigurationBlock_plugin_missing_in_baseline_message,
+ KEY_PLUGIN_MISSING_IN_BASELINE);
+ fCombos.add(combo);
Dialog.applyDialogFont(fMainComp);
return fMainComp;
}
@@ -334,8 +343,7 @@
try {
ArrayList<Key> changes = new ArrayList<>();
collectChanges(fLookupOrder[0], changes);
- if (changes.size() == 1) {
- // Note that there is only 1 key in ApiBaselineConfigBlock
+ if (changes.size() == 1 && changes.get(0).equals(KEY_MISSING_DEFAULT_API_PROFILE)) {
Key k = changes.get(0);
String original = k.getStoredValue(fLookupOrder[0], null);
@@ -542,9 +550,12 @@
* fCombos
*/
private void updateCombos() {
- if (this.fCombo != null) {
- ControlData data = (ControlData) fCombo.getData();
- this.fCombo.select(data.getSelection(data.getKey().getStoredValue(fLookupOrder, false, fManager)));
+ for (Combo combo : fCombos) {
+ if (combo != null) {
+ ControlData data = (ControlData) combo.getData();
+ combo.select(data.getSelection(data.getKey().getStoredValue(fLookupOrder, false, fManager)));
+ }
+
}
}
@@ -577,7 +588,7 @@
combo.addSelectionListener(selectionlistener);
combo.select(data.getSelection(key.getStoredValue(fLookupOrder, false, fManager)));
addHighlight(parent, lbl, combo);
- fLabel = lbl;
+ fLabels.add(lbl);
return combo;
}
@@ -611,13 +622,14 @@
return fgAllKeys;
}
- public void selectOption() {
- if (fCombo != null && !fCombo.isDisposed()) {
- fCombo.setFocus();
- if (fLabel != null && !fLabel.isDisposed()) {
+ public void selectOption(int index) {
+ if (fCombos.get(index) != null && !fCombos.get(index).isDisposed()) {
+ fCombos.get(index).setFocus();
+ if (fLabels.get(index) != null && !(fLabels.get(index).isDisposed())) {
if (org.eclipse.jface.util.Util.isMac()) {
- if (fLabel != null) {
- highlight(fCombo.getParent(), fLabel, fCombo, ConfigurationBlock.HIGHLIGHT_FOCUS);
+ if (fLabels.get(index) != null) {
+ highlight(fCombos.get(index).getParent(), fLabels.get(index), fCombos.get(index),
+ ConfigurationBlock.HIGHLIGHT_FOCUS);
}
}
}
diff --git a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/PreferenceMessages.java b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/PreferenceMessages.java
index 72c2ffb..28e5491 100644
--- a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/PreferenceMessages.java
+++ b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/PreferenceMessages.java
@@ -89,6 +89,7 @@
public static String ProjectSelectionDialog_checkbox_text;
public static String ApiProfilesConfigurationBlock_options_group_title;
public static String ApiProfilesConfigurationBlock_missing_default_api_profile_message;
+ public static String ApiProfilesConfigurationBlock_plugin_missing_in_baseline_message;
public static String API_COMPONENT_REMOVED_API_TYPE;
public static String API_COMPONENT_REMOVED_TYPE;
diff --git a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/preferencemessages.properties b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/preferencemessages.properties
index 504a24f..c86a7b3 100644
--- a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/preferencemessages.properties
+++ b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/preferencemessages.properties
@@ -58,6 +58,7 @@
ProjectSelectionDialog_checkbox_text=Show only &projects with project specific settings
ApiProfilesConfigurationBlock_options_group_title=Options
ApiProfilesConfigurationBlock_missing_default_api_profile_message=Mi&ssing API baseline:
+ApiProfilesConfigurationBlock_plugin_missing_in_baseline_message=Plug-in &missing in API baseline:
ApiErrorsWarningsConfigurationBlock_setAllto=Set All As
CompatibilityReportApiBreakageWhenMajorVersionIncremented=&Report API breakage even if authorized by major version increment
diff --git a/apitools/org.eclipse.pde.api.tools/META-INF/MANIFEST.MF b/apitools/org.eclipse.pde.api.tools/META-INF/MANIFEST.MF
index 06b23b9..8e5be15 100644
--- a/apitools/org.eclipse.pde.api.tools/META-INF/MANIFEST.MF
+++ b/apitools/org.eclipse.pde.api.tools/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.pde.api.tools;singleton:=true
-Bundle-Version: 1.2.200.qualifier
+Bundle-Version: 1.2.300.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.11.0,4.0.0)",
diff --git a/apitools/org.eclipse.pde.api.tools/pom.xml b/apitools/org.eclipse.pde.api.tools/pom.xml
index 014bd87..207ebd7 100644
--- a/apitools/org.eclipse.pde.api.tools/pom.xml
+++ b/apitools/org.eclipse.pde.api.tools/pom.xml
@@ -18,7 +18,7 @@
</parent>
<groupId>org.eclipse.pde</groupId>
<artifactId>org.eclipse.pde.api.tools</artifactId>
- <version>1.2.200-SNAPSHOT</version>
+ <version>1.2.300-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<properties>
<defaultSigning-excludeInnerJars>true</defaultSigning-excludeInnerJars>
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiPluginPreferenceInitializer.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiPluginPreferenceInitializer.java
index e974765..8fba176 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiPluginPreferenceInitializer.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiPluginPreferenceInitializer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2016 IBM Corporation and others.
+ * Copyright (c) 2007, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -72,6 +72,7 @@
node.put(IApiProblemTypes.INCOMPATIBLE_API_COMPONENT_VERSION_REPORT_MAJOR_WITHOUT_BREAKING_CHANGE, ApiPlugin.VALUE_WARNING);
node.put(IApiProblemTypes.MISSING_DEFAULT_API_BASELINE, ApiPlugin.VALUE_ERROR);
+ node.put(IApiProblemTypes.MISSING_PLUGIN_IN_API_BASELINE, ApiPlugin.VALUE_WARNING);
node.put(IApiProblemTypes.MISSING_EE_DESCRIPTIONS, ApiPlugin.VALUE_WARNING);
// api component resolution
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/JavadocTagManager.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/JavadocTagManager.java
index f061b73..f600708 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/JavadocTagManager.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/JavadocTagManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2014 IBM Corporation and others.
+ * Copyright (c) 2007, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -348,7 +348,7 @@
if (values != null) {
return values;
}
- return Collections.EMPTY_SET;
+ return Collections.emptySet();
}
/**
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/RequiredComponentDescription.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/RequiredComponentDescription.java
index fea3c0c..cf12972 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/RequiredComponentDescription.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/RequiredComponentDescription.java
@@ -71,11 +71,6 @@
return fId;
}
- /**
- * (non-Javadoc)
- *
- * @see IRequiredComponentDescription#getVersionRange()
- */
@Override
public IVersionRange getVersionRange() {
return fRange;
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer.java
index 428114c..79f5f41 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2020 IBM Corporation and others.
+ * Copyright (c) 2008, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -78,7 +78,7 @@
import org.eclipse.pde.api.tools.internal.IApiCoreConstants;
import org.eclipse.pde.api.tools.internal.comparator.Delta;
import org.eclipse.pde.api.tools.internal.model.ProjectComponent;
-import org.eclipse.pde.api.tools.internal.model.StubApiComponent;
+import org.eclipse.pde.api.tools.internal.model.WorkspaceBaseline;
import org.eclipse.pde.api.tools.internal.problems.ApiProblemFactory;
import org.eclipse.pde.api.tools.internal.problems.ApiProblemFilter;
import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
@@ -248,6 +248,9 @@
reference = bestMatchReference;
}
}
+ } else {
+ // report that plugin not in baseline
+ reportMissingComponentInBaseline();
}
this.fBuildState = state;
@@ -282,9 +285,6 @@
localMonitor.split(2);
}
- // check EE description status
- checkEEDescriptions();
-
// usage checks
checkApiUsage(bcontext, component, localMonitor.split(1));
// tag validation
@@ -381,40 +381,6 @@
return fContinueOnResolutionError;
}
- /**
- * Checks if the setting to scan for invalid references is not set to be
- * ignored AND there are no descriptions installed
- *
- * @param component
- * @param monitor
- * @since 1.0.400
- */
- void checkEEDescriptions() {
- if (ignoreEEDescriptionCheck()) {
- if (ApiPlugin.DEBUG_API_ANALYZER) {
- System.out.println("Ignoring check for API EE descriptions"); //$NON-NLS-1$
- }
- return;
- }
- if (ApiPlugin.DEBUG_API_ANALYZER) {
- System.out.println("Checking if there are any API EE descriptions installed if the preference is set to not be 'ignore'"); //$NON-NLS-1$
- }
- String[] ees = StubApiComponent.getInstalledMetadata();
- if (ees.length < 1) {
- IApiProblem problem = ApiProblemFactory.newApiUsageProblem(Path.EMPTY.toString(), null, new String[] { fJavaProject.getElementName() }, new String[] { IApiMarkerConstants.API_MARKER_ATTR_ID }, new Object[] { Integer.valueOf(IApiMarkerConstants.API_USAGE_MARKER_ID) }, -1, -1, -1, IElementDescriptor.RESOURCE, IApiProblem.MISSING_EE_DESCRIPTIONS);
- addProblem(problem);
- }
- }
-
- /**
- * @return if the API EE description check should be ignored or not
- */
- private boolean ignoreEEDescriptionCheck() {
- if (fJavaProject == null) {
- return true;
- }
- return ApiPlugin.getDefault().getSeverityLevel(IApiProblemTypes.INVALID_REFERENCE_IN_SYSTEM_LIBRARIES, fJavaProject.getProject().getProject()) == ApiPlugin.SEVERITY_IGNORE;
- }
/**
* Processes the API Use Scan report for the given API Component
@@ -1046,6 +1012,14 @@
return ApiPlugin.getDefault().getSeverityLevel(IApiProblemTypes.MISSING_DEFAULT_API_BASELINE, fJavaProject.getProject().getProject()) == ApiPlugin.SEVERITY_IGNORE;
}
+ private boolean ignoreMissingComponentInBaseline() {
+ if (fJavaProject == null) {
+ return true;
+ }
+ return ApiPlugin.getDefault().getSeverityLevel(IApiProblemTypes.MISSING_PLUGIN_IN_API_BASELINE,
+ fJavaProject.getProject().getProject()) == ApiPlugin.SEVERITY_IGNORE;
+ }
+
/**
* Whether to ignore since tag checks. If <code>null</code> is passed in we
* are asking if all since tag checks should be ignored, if a pref is
@@ -2494,11 +2468,58 @@
addProblem(problem);
}
+ private void reportMissingComponentInBaseline() {
+ if (ignoreMissingComponentInBaseline()) {
+ return;
+ }
+ IApiProblem problem = ApiProblemFactory.newApiBaselineProblem(Path.EMPTY.toString(),
+ new String[] { IApiMarkerConstants.API_MARKER_ATTR_ID },
+ new Object[] { Integer.valueOf(IApiMarkerConstants.DEFAULT_API_BASELINE_MARKER_ID) },
+ IElementDescriptor.RESOURCE, IApiProblem.API_PLUGIN_NOT_PRESENT_IN_BASELINE);
+ addProblem(problem);
+ }
+
/**
* Checks to see if the baseline set in the workspace has at least 1 matching
* project in the workspace
*/
public void checkBaselineMismatch(IApiBaseline baseline, IApiBaseline workspaceBaseline) {
+ int severityLevel = ApiPlugin.getDefault().getSeverityLevel(IApiProblemTypes.MISSING_DEFAULT_API_BASELINE,
+ null);
+ if (severityLevel == ApiPlugin.SEVERITY_IGNORE) {
+ return;
+ }
+ if (workspaceBaseline instanceof WorkspaceBaseline && baseline != null) {
+ // if this workspace has been processed before for this baseline, get it from
+ // past processing
+ if (((WorkspaceBaseline) workspaceBaseline).containsBaseline(baseline)) {
+ IApiProblem pro = ((WorkspaceBaseline) workspaceBaseline).getProblem(baseline);
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ try {
+ IMarker[] findMarkers = root.findMarkers(IApiMarkerConstants.DEFAULT_API_BASELINE_PROBLEM_MARKER,
+ false, IResource.DEPTH_ZERO);
+ if (pro != null && findMarkers.length == 1) {
+ return; // since we have baseline, so cant be missing baseline
+ }
+ if (pro == null && findMarkers.length == 0) {
+ return;
+ }
+ if (pro == null && findMarkers.length == 1) {
+ for (IMarker iMarker : findMarkers) {
+ iMarker.delete();
+ }
+ return;
+ }
+ if (pro != null && findMarkers.length == 0) {
+ addProblem(pro);
+ return;
+ }
+ } catch (CoreException e) {
+ ApiPlugin.log(e);
+ }
+ return;
+ }
+ }
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
try {
IMarker[] findMarkers = root.findMarkers(IApiMarkerConstants.DEFAULT_API_BASELINE_PROBLEM_MARKER, false,
@@ -2512,11 +2533,7 @@
if (baseline == null || workspaceBaseline == null) {
return;
}
- int severityLevel = ApiPlugin.getDefault().getSeverityLevel(IApiProblemTypes.MISSING_DEFAULT_API_BASELINE,
- null);
- if (severityLevel == ApiPlugin.SEVERITY_IGNORE) {
- return;
- }
+
IApiComponent[] workspacesComponents = workspaceBaseline.getApiComponents();
boolean found = false;
for (IApiComponent iApiComponent : workspacesComponents) {
@@ -2527,15 +2544,21 @@
break;
}
}
+
}
if (found) {
+ if (workspaceBaseline instanceof WorkspaceBaseline) {
+ ((WorkspaceBaseline) workspaceBaseline).putMismatchInfo(baseline, null);
+ }
return;
}
-
IApiProblem problem = ApiProblemFactory.newApiBaselineProblem(Path.EMPTY.toString(),
new String[] { IApiMarkerConstants.API_MARKER_ATTR_ID },
new Object[] { Integer.valueOf(IApiMarkerConstants.DEFAULT_API_BASELINE_MARKER_ID) },
IElementDescriptor.RESOURCE, IApiProblem.API_BASELINE_MISMATCH);
+ if (workspaceBaseline instanceof WorkspaceBaseline) {
+ ((WorkspaceBaseline) workspaceBaseline).putMismatchInfo(baseline, problem);
+ }
addProblem(problem);
}
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/compatible_delta_messages.properties b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/compatible_delta_messages.properties
index 010c7af..2797288 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/compatible_delta_messages.properties
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/compatible_delta_messages.properties
@@ -229,4 +229,4 @@
# {0} given element
111=The deprecation modifiers has been removed from {0}
# {0} type name
-112 = The {0} restriction have been removed for type {1}
\ No newline at end of file
+112 = The {0} restriction has been removed for type {1}
\ No newline at end of file
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiBaseline.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiBaseline.java
index c9335b2..3f1fc47 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiBaseline.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiBaseline.java
@@ -769,17 +769,11 @@
return null;
}
- /**
- * @see org.eclipse.pde.api.tools.internal.model.ApiElement#setName(java.lang.String)
- */
@Override
public void setName(String name) {
super.setName(name);
}
- /**
- * @see java.lang.Object#equals(java.lang.Object)
- */
@Override
public boolean equals(Object obj) {
if (obj instanceof IApiBaseline) {
@@ -789,9 +783,6 @@
return super.equals(obj);
}
- /**
- * @see java.lang.Object#hashCode()
- */
@Override
public int hashCode() {
return this.getName().hashCode();
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiModelCache.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiModelCache.java
index 383e280..9a0f582 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiModelCache.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiModelCache.java
@@ -249,7 +249,7 @@
default:
break;
}
- if (componentid.startsWith("JavaSE-")) { //$NON-NLS-1$
+ if (componentid.startsWith("JavaSE-") && this.fRootCache != null) { //$NON-NLS-1$
// for system component, retrieve element from any baseline instead
// of recreating the structure and caching the equivalent element info
IApiElement element = getElementInfoFromAnyBaseline(baselineid, componentid, updatedIdentifier);
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiType.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiType.java
index 33864a3..f8cbea8 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiType.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiType.java
@@ -574,9 +574,6 @@
return members;
}
- /**
- * @see java.lang.Object#toString()
- */
@Override
public String toString() {
StringBuilder buffer = new StringBuilder();
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ArchiveApiTypeContainer.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ArchiveApiTypeContainer.java
index cec9720..3cc2d43 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ArchiveApiTypeContainer.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ArchiveApiTypeContainer.java
@@ -75,9 +75,6 @@
return getTypeName().compareTo(((ArchiveApiTypeRoot) o).getTypeName());
}
- /**
- * @see java.lang.Object#equals(java.lang.Object)
- */
@Override
public boolean equals(Object obj) {
if (obj instanceof ArchiveApiTypeRoot) {
@@ -87,9 +84,6 @@
return false;
}
- /**
- * @see java.lang.Object#hashCode()
- */
@Override
public int hashCode() {
return getName().hashCode();
@@ -211,9 +205,6 @@
visitor.end(this);
}
- /**
- * @see java.lang.Object#toString()
- */
@Override
public String toString() {
StringBuilder buff = new StringBuilder();
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/CompositeApiTypeContainer.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/CompositeApiTypeContainer.java
index 2be99c3..cdcbfd7 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/CompositeApiTypeContainer.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/CompositeApiTypeContainer.java
@@ -44,9 +44,6 @@
return fContainers;
}
- /**
- * @see java.lang.Object#toString()
- */
@Override
public String toString() {
StringBuilder buff = new StringBuilder();
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/DirectoryApiTypeContainer.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/DirectoryApiTypeContainer.java
index 338e692..457ef25 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/DirectoryApiTypeContainer.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/DirectoryApiTypeContainer.java
@@ -129,9 +129,6 @@
super(parent, IApiElement.API_TYPE_CONTAINER, location);
}
- /**
- * @see org.eclipse.pde.api.tools.internal.provisional.IApiTypeContainer#accept(org.eclipse.pde.api.tools.internal.provisional.ApiTypeContainerVisitor)
- */
@Override
public void accept(ApiTypeContainerVisitor visitor) throws CoreException {
if (visitor.visit(this)) {
@@ -171,9 +168,6 @@
visitor.end(this);
}
- /**
- * @see java.lang.Object#toString()
- */
@Override
public String toString() {
StringBuilder buff = new StringBuilder();
@@ -266,10 +260,6 @@
}
}
- /**
- * @see org.eclipse.pde.api.tools.internal.provisional.IApiTypeContainer#findClassFile(java.lang.String,
- * java.lang.String)
- */
@Override
public IApiTypeRoot findTypeRoot(String qualifiedName, String id) throws CoreException {
return findTypeRoot(qualifiedName);
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ProjectTypeContainer.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ProjectTypeContainer.java
index e7a88a6..13a2087 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ProjectTypeContainer.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ProjectTypeContainer.java
@@ -40,7 +40,6 @@
*/
public class ProjectTypeContainer extends ApiElement implements IApiTypeContainer {
- private ResourceApiTypeRoot lastResourceApiTypeRoot = null;
/**
* Proxy visitor for collecting package names, etc for our type containers
@@ -90,9 +89,6 @@
this.fRoot = container;
}
- /**
- * @see org.eclipse.pde.api.tools.internal.AbstractApiTypeContainer#accept(org.eclipse.pde.api.tools.internal.provisional.ApiTypeContainerVisitor)
- */
@Override
public void accept(ApiTypeContainerVisitor visitor) throws CoreException {
if (visitor.visit(this)) {
@@ -101,17 +97,11 @@
visitor.end(this);
}
- /**
- * @see org.eclipse.pde.api.tools.internal.provisional.IApiTypeContainer#close()
- */
@Override
public void close() throws CoreException {
fPackageNames = null;
}
- /**
- * @see java.lang.Object#toString()
- */
@Override
public String toString() {
StringBuilder buff = new StringBuilder();
@@ -170,9 +160,6 @@
}
}
- /**
- * @see org.eclipse.pde.api.tools.internal.provisional.IApiTypeContainer#findTypeRoot(java.lang.String)
- */
@Override
public IApiTypeRoot findTypeRoot(String qualifiedName) throws CoreException {
int index = qualifiedName.lastIndexOf('.');
@@ -186,23 +173,12 @@
if (folder.exists()) {
IFile file = folder.getFile(cfName + Util.DOT_CLASS_SUFFIX);
if (file.exists()) {
- if (lastResourceApiTypeRoot != null) {
- // check if same file and qualified name
- if (lastResourceApiTypeRoot.getName().equals(qualifiedName)
- && lastResourceApiTypeRoot.getFile().equals(file)) {
- return lastResourceApiTypeRoot;
- }
- }
- lastResourceApiTypeRoot = new ResourceApiTypeRoot(this, file, qualifiedName);
- return lastResourceApiTypeRoot;
+ return new ResourceApiTypeRoot(this, file, qualifiedName);
}
}
return null;
}
- /**
- * @see org.eclipse.pde.api.tools.internal.AbstractApiTypeContainer#getPackageNames()
- */
@Override
public String[] getPackageNames() throws CoreException {
if (fPackageNames == null) {
@@ -225,10 +201,6 @@
dir.accept(new ContainerVisitor(names, dir), IResource.NONE);
}
- /**
- * @see org.eclipse.pde.api.tools.internal.provisional.IApiTypeContainer#findTypeRoot(java.lang.String,
- * java.lang.String)
- */
@Override
public IApiTypeRoot findTypeRoot(String qualifiedName, String id) throws CoreException {
return findTypeRoot(qualifiedName);
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ResourceApiTypeRoot.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ResourceApiTypeRoot.java
index e8c13c5..d0f731a 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ResourceApiTypeRoot.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ResourceApiTypeRoot.java
@@ -81,9 +81,9 @@
return getName();
}
- public IFile getFile() {
- return fFile;
- }
+// public IFile getFile() {
+// return fFile;
+// }
@Override
public String toString() {
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/StubArchiveApiTypeContainer.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/StubArchiveApiTypeContainer.java
index 6e258ae..3102067 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/StubArchiveApiTypeContainer.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/StubArchiveApiTypeContainer.java
@@ -78,9 +78,6 @@
return getTypeName().compareTo(((ArchiveApiTypeRoot) o).getTypeName());
}
- /**
- * @see java.lang.Object#equals(java.lang.Object)
- */
@Override
public boolean equals(Object obj) {
if (obj instanceof ArchiveApiTypeRoot) {
@@ -90,9 +87,6 @@
return false;
}
- /**
- * @see java.lang.Object#hashCode()
- */
@Override
public int hashCode() {
return getName().hashCode();
@@ -162,9 +156,6 @@
this.fLocation = path;
}
- /**
- * @see org.eclipse.pde.api.tools.internal.AbstractApiTypeContainer#accept(org.eclipse.pde.api.tools.internal.provisional.ApiTypeContainerVisitor)
- */
@Override
public void accept(ApiTypeContainerVisitor visitor) throws CoreException {
if (visitor.visit(this)) {
@@ -190,9 +181,6 @@
visitor.end(this);
}
- /**
- * @see java.lang.Object#toString()
- */
@Override
public String toString() {
StringBuilder buff = new StringBuilder();
@@ -200,9 +188,6 @@
return buff.toString();
}
- /**
- * @see org.eclipse.pde.api.tools.internal.AbstractApiTypeContainer#close()
- */
@Override
public synchronized void close() throws CoreException {
if (fZipFile != null) {
@@ -215,9 +200,6 @@
}
}
- /**
- * @see org.eclipse.pde.api.tools.internal.provisional.IApiTypeContainer#findTypeRoot(java.lang.String)
- */
@Override
public IApiTypeRoot findTypeRoot(String qualifiedName) throws CoreException {
init();
@@ -236,9 +218,6 @@
return null;
}
- /**
- * @see org.eclipse.pde.api.tools.internal.AbstractApiTypeContainer#getPackageNames()
- */
@Override
public String[] getPackageNames() throws CoreException {
init();
@@ -312,10 +291,6 @@
return this.fLocation.hashCode();
}
- /**
- * @see org.eclipse.pde.api.tools.internal.provisional.IApiTypeContainer#findTypeRoot(java.lang.String,
- * java.lang.String)
- */
@Override
public IApiTypeRoot findTypeRoot(String qualifiedName, String id) throws CoreException {
return findTypeRoot(qualifiedName);
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/WorkspaceBaseline.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/WorkspaceBaseline.java
index 987a4e0..9d173a2 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/WorkspaceBaseline.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/WorkspaceBaseline.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2013 IBM Corporation and others.
+ * Copyright (c) 2009, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -14,12 +14,15 @@
package org.eclipse.pde.api.tools.internal.model;
import java.util.Arrays;
+import java.util.HashMap;
import java.util.HashSet;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.osgi.service.resolver.State;
import org.eclipse.pde.api.tools.internal.ApiBaselineManager;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
+import org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblem;
import org.eclipse.pde.internal.core.PDECore;
/**
@@ -29,6 +32,10 @@
*/
public class WorkspaceBaseline extends ApiBaseline {
+ // If workspace is changed, then WorkspaceBaseline is disposed and a
+ // new WorkspaceBaseline is created, hence mismatch problem can be stored
+ // with a workspace baseline
+ public HashMap<IApiBaseline, IApiProblem> mismatch = new HashMap<>();
/**
* Constructor
*/
@@ -39,6 +46,7 @@
@Override
public void dispose() {
doDispose();
+ mismatch.clear();
}
@Override
@@ -46,6 +54,21 @@
return PDECore.getDefault().getModelManager().getState().getState();
}
+
+ public boolean containsBaseline(IApiBaseline b) {
+ return mismatch.containsKey(b);
+ }
+
+ // can be null showing no problem
+ public IApiProblem getProblem(IApiBaseline b) {
+ return mismatch.get(b);
+ }
+
+ public void putMismatchInfo(IApiBaseline baseline, IApiProblem problem) {
+ mismatch.put(baseline, problem);
+
+ }
+
@Override
public void addApiComponents(IApiComponent[] components) throws CoreException {
HashSet<String> ees = new HashSet<>();
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/problems/ApiProblem.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/problems/ApiProblem.java
index 57e5041..963c119 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/problems/ApiProblem.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/problems/ApiProblem.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2016 IBM Corporation and others.
+ * Copyright (c) 2008, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -445,6 +445,9 @@
case IApiProblem.API_BASELINE_MISSING:
case IApiProblem.API_BASELINE_MISMATCH:
return "API_BASELINE_MISSING"; //$NON-NLS-1$
+ case IApiProblem.API_PLUGIN_NOT_PRESENT_IN_BASELINE:
+ return "API_NOT_BASELINE"; //$NON-NLS-1$
+
default:
return Util.UNKNOWN_KIND;
}
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/problems/ApiProblemFactory.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/problems/ApiProblemFactory.java
index d3a4124..51430c1 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/problems/ApiProblemFactory.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/problems/ApiProblemFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2018 IBM Corporation and others.
+ * Copyright (c) 2008, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -584,6 +584,9 @@
return 1;
case IApiProblem.API_BASELINE_MISMATCH:
return 57;
+ case IApiProblem.API_PLUGIN_NOT_PRESENT_IN_BASELINE:
+ return 60;
+
default:
break;
}
@@ -724,8 +727,7 @@
}
case IApiProblem.UNUSED_PROBLEM_FILTERS:
return 30;
- case IApiProblem.MISSING_EE_DESCRIPTIONS:
- return 38;
+
default:
break;
}
@@ -1030,6 +1032,8 @@
case IApiProblem.API_BASELINE_MISSING:
case IApiProblem.API_BASELINE_MISMATCH:
return IApiProblemTypes.MISSING_DEFAULT_API_BASELINE;
+ case IApiProblem.API_PLUGIN_NOT_PRESENT_IN_BASELINE:
+ return IApiProblemTypes.MISSING_PLUGIN_IN_API_BASELINE;
default:
break;
}
@@ -1107,8 +1111,7 @@
return IApiProblemTypes.INVALID_REFERENCE_IN_SYSTEM_LIBRARIES;
case IApiProblem.UNUSED_PROBLEM_FILTERS:
return IApiProblemTypes.UNUSED_PROBLEM_FILTERS;
- case IApiProblem.MISSING_EE_DESCRIPTIONS:
- return IApiProblemTypes.MISSING_EE_DESCRIPTIONS;
+
default:
break;
}
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/problems/problemmessages.properties b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/problems/problemmessages.properties
index ba7409b..3b76504 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/problems/problemmessages.properties
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/problems/problemmessages.properties
@@ -11,12 +11,13 @@
# Contributors:
# IBM Corporation - initial API and implementation
###############################################################################
-# available message ids 59, 60, 62, 63, 65, 68, 70, 71, 75, 80,
+# available message ids 62, 63, 65, 68, 70, 71, 75, 80,
# 82, 83, 88, 90, 93
#API baseline
1 = An API baseline has not been set for the current workspace.
57 = There is a possible API baseline mismatch since none of the workspace projects is in the baseline.
+60 = This plug-in is not present in the currently active API baseline.
31 = API analysis aborted for ''{0}'' since its build path is incomplete
38 = Execution environment references were not checked for ''{0}'' because no environment descriptions are installed.
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/problems/IApiProblem.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/problems/IApiProblem.java
index a237c9e..6ccafb7 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/problems/IApiProblem.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/problems/IApiProblem.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2018 IBM Corporation and others.
+ * Copyright (c) 2008, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -320,17 +320,6 @@
*/
public static final int UNUSED_PROBLEM_FILTERS = 10;
/**
- * Constant representing the value of missing EE descriptions if the
- * preferences are configured to perform the system library scans
- * {@link IApiProblem} kind <br>
- * Value is:<code>11</code>
- *
- * @see #getKind()
- * @see #CATEGORY_USAGE
- * @since 1.0.400
- */
- public static final int MISSING_EE_DESCRIPTIONS = 11;
- /**
* Constant representing the value of a duplicate annotation in use <br>
* <br>
* Value is: <code>12</code>
@@ -514,6 +503,15 @@
* @see #CATEGORY_API_BASELINE
*/
public static final int API_BASELINE_MISMATCH = 2;
+ /**
+ * Constant representing that a plugin is not present in the baseline
+ * {@link IApiProblem} kind. <br>
+ * Value is: <code>3</code>
+ *
+ * @see #getKind()
+ * @see #CATEGORY_API_BASELINE
+ */
+ public static final int API_PLUGIN_NOT_PRESENT_IN_BASELINE = 3;
/**
* Constant representing the value of a API component resolution
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/problems/IApiProblemTypes.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/problems/IApiProblemTypes.java
index 9ba9cdb..4ad4d60 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/problems/IApiProblemTypes.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/problems/IApiProblemTypes.java
@@ -130,6 +130,7 @@
public static final String INCOMPATIBLE_API_COMPONENT_VERSION_REPORT_MAJOR_WITHOUT_BREAKING_CHANGE = "incompatible_api_component_version_report_major_without_breaking_change"; //$NON-NLS-1$
public static final String MISSING_DEFAULT_API_BASELINE = "missing_default_api_profile"; //$NON-NLS-1$
+ public static final String MISSING_PLUGIN_IN_API_BASELINE = "missing_plugin_in_baseline"; //$NON-NLS-1$
public static final String REPORT_RESOLUTION_ERRORS_API_COMPONENT = "report_resolution_errors_api_component"; //$NON-NLS-1$
// API usage problems
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/FilteredElements.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/FilteredElements.java
index 9570e96..ed2fe93 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/FilteredElements.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/FilteredElements.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2013 IBM Corporation and others.
+ * Copyright (c) 2010, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -25,14 +25,14 @@
public Set<String> getExactMatches() {
if (this.exactMatches == null) {
- return Collections.EMPTY_SET;
+ return Collections.emptySet();
}
return this.exactMatches;
}
public Set<String> getPartialMatches() {
if (this.partialMatches == null) {
- return Collections.EMPTY_SET;
+ return Collections.emptySet();
}
return this.partialMatches;
}
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/Util.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/Util.java
index 94950ff..3de8141 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/Util.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/Util.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2020 IBM Corporation and others.
+ * Copyright (c) 2007, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -2838,9 +2838,6 @@
case IApiProblem.INVALID_REFERENCE_IN_SYSTEM_LIBRARIES:
return IApiProblemTypes.INVALID_REFERENCE_IN_SYSTEM_LIBRARIES;
- case IApiProblem.MISSING_EE_DESCRIPTIONS:
- return IApiProblemTypes.MISSING_EE_DESCRIPTIONS;
-
// this is usage??
case IApiProblem.UNUSED_PROBLEM_FILTERS:
return IApiProblemTypes.UNUSED_PROBLEM_FILTERS;
diff --git a/ds/org.eclipse.pde.ds.annotations.tests/projects/test0/src/ds/annotations/test0/Activator.java b/ds/org.eclipse.pde.ds.annotations.tests/projects/test0/src/ds/annotations/test0/Activator.java
index d437c87..a26799d 100644
--- a/ds/org.eclipse.pde.ds.annotations.tests/projects/test0/src/ds/annotations/test0/Activator.java
+++ b/ds/org.eclipse.pde.ds.annotations.tests/projects/test0/src/ds/annotations/test0/Activator.java
@@ -11,18 +11,10 @@
return context;
}
- /*
- * (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
public void start(BundleContext bundleContext) throws Exception {
Activator.context = bundleContext;
}
- /*
- * (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
public void stop(BundleContext bundleContext) throws Exception {
Activator.context = null;
}
diff --git a/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/Activator.java b/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/Activator.java
index f32b509..c76838a 100644
--- a/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/Activator.java
+++ b/ds/org.eclipse.pde.ds.annotations.tests/src/org/eclipse/pde/ds/internal/annotations/tests/Activator.java
@@ -13,19 +13,11 @@
return context;
}
- /*
- * (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
@Override
public void start(BundleContext bundleContext) throws Exception {
Activator.context = bundleContext;
}
- /*
- * (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
@Override
public void stop(BundleContext bundleContext) throws Exception {
Activator.context = null;
diff --git a/features/org.eclipse.pde-feature/pom.xml b/features/org.eclipse.pde-feature/pom.xml
index 27f4fac..62dec22 100644
--- a/features/org.eclipse.pde-feature/pom.xml
+++ b/features/org.eclipse.pde-feature/pom.xml
@@ -25,15 +25,15 @@
<build>
<plugins>
<plugin>
- <groupId>org.eclipse.tycho.extras</groupId>
- <artifactId>tycho-source-feature-plugin</artifactId>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-source-plugin</artifactId>
<version>${tycho.version}</version>
<executions>
<execution>
<phase>package</phase>
- <id>source-feature</id>
+ <id>feature-source</id>
<goals>
- <goal>source-feature</goal>
+ <goal>feature-source</goal>
</goals>
<configuration>
<excludes>
@@ -50,7 +50,7 @@
<version>${tycho.version}</version>
<executions>
<execution>
- <id>attached-p2-metadata</id>
+ <id>attach-p2-metadata</id>
<phase>package</phase>
<goals>
<goal>p2-metadata</goal>
diff --git a/ua/org.eclipse.pde.ua.core/META-INF/MANIFEST.MF b/ua/org.eclipse.pde.ua.core/META-INF/MANIFEST.MF
index e175892..deae6a8 100644
--- a/ua/org.eclipse.pde.ua.core/META-INF/MANIFEST.MF
+++ b/ua/org.eclipse.pde.ua.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.pde.ua.core;singleton:=true
-Bundle-Version: 1.2.100.qualifier
+Bundle-Version: 1.2.200.qualifier
Bundle-Activator: org.eclipse.pde.internal.ua.core.Activator
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.11.0,4.0.0)",
org.eclipse.pde.core;bundle-version="[3.3.0,4.0.0)",
diff --git a/ua/org.eclipse.pde.ua.core/pom.xml b/ua/org.eclipse.pde.ua.core/pom.xml
index f8088bd..55eb68b 100644
--- a/ua/org.eclipse.pde.ua.core/pom.xml
+++ b/ua/org.eclipse.pde.ua.core/pom.xml
@@ -19,7 +19,7 @@
</parent>
<groupId>org.eclipse.pde</groupId>
<artifactId>org.eclipse.pde.ua.core</artifactId>
- <version>1.2.100-SNAPSHOT</version>
+ <version>1.2.200-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<properties>
<code.ignoredWarnings>-warn:-deprecation,unavoidableGenericProblems</code.ignoredWarnings>
diff --git a/ua/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/cheatsheet/simple/text/SimpleCSDocumentFactory.java b/ua/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/cheatsheet/simple/text/SimpleCSDocumentFactory.java
index 8aee8f5..1f35717 100644
--- a/ua/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/cheatsheet/simple/text/SimpleCSDocumentFactory.java
+++ b/ua/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/cheatsheet/simple/text/SimpleCSDocumentFactory.java
@@ -285,14 +285,6 @@
return new SimpleCSIntro(fModel);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.pde.internal.ua.core.icheatsheet.simple.ISimpleCSModelFactory
- * #createSimpleCSItem
- * (org.eclipse.pde.internal.ua.core.icheatsheet.simple.ISimpleCSObject)
- */
@Override
public ISimpleCSItem createSimpleCSItem(ISimpleCSObject parent) {
return new SimpleCSItem(fModel);
diff --git a/ua/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/ctxhelp/text/CtxHelpContext.java b/ua/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/ctxhelp/text/CtxHelpContext.java
index 3c690a8..287291a 100644
--- a/ua/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/ctxhelp/text/CtxHelpContext.java
+++ b/ua/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/ctxhelp/text/CtxHelpContext.java
@@ -127,25 +127,11 @@
}
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.pde.internal.ua.core.ctxhelp.text.CtxHelpObject#canAddChild(
- * org.eclipse.pde.internal.ua.core.ctxhelp.text.CtxHelpObject)
- */
@Override
public boolean canAddChild(int objectType) {
return objectType == TYPE_TOPIC || objectType == TYPE_COMMAND;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.pde.internal.core.text.ctxhelp.CtxHelpObject#canAddSibling
- * (int)
- */
@Override
public boolean canAddSibling(int objectType) {
return objectType == TYPE_CONTEXT;
diff --git a/ua/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/toc/text/TocModel.java b/ua/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/toc/text/TocModel.java
index 0b21f72..6007c9b 100644
--- a/ua/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/toc/text/TocModel.java
+++ b/ua/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/toc/text/TocModel.java
@@ -63,21 +63,10 @@
return null;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.pde.internal.ua.core.icheatsheet.simple.ITocModel#getFactory()
- */
public TocDocumentFactory getFactory() {
return fFactory;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.pde.internal.ua.core.icheatsheet.simple.ITocModel#getToc()
- */
public Toc getToc() {
if (fToc == null) {
fToc = getFactory().createToc();
diff --git a/ui/org.eclipse.pde.core/.settings/.api_filters b/ui/org.eclipse.pde.core/.settings/.api_filters
index 1599eda..7ac548c 100644
--- a/ui/org.eclipse.pde.core/.settings/.api_filters
+++ b/ui/org.eclipse.pde.core/.settings/.api_filters
@@ -1,4 +1,13 @@
-<?xml version="1.0" encoding="UTF-8"?><component id="org.eclipse.pde.core" version="2">
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<component id="org.eclipse.pde.core" version="2">
+ <resource path="META-INF/MANIFEST.MF" type="org.eclipse.pde.core.IModelProvider">
+ <filter comment="deprecated long back" id="305324134">
+ <message_arguments>
+ <message_argument value="org.eclipse.pde.core.IModelProvider"/>
+ <message_argument value="org.eclipse.pde.core_3.14.200"/>
+ </message_arguments>
+ </filter>
+ </resource>
<resource path="src/org/eclipse/pde/internal/core/project/BundleProjectService.java" type="org.eclipse.pde.internal.core.project.BundleProjectService">
<filter comment="Platform Team allows use of bundle importers for PDE import from source repository" id="640712815">
<message_arguments>
@@ -24,4 +33,4 @@
</message_arguments>
</filter>
</resource>
-</component>
\ No newline at end of file
+</component>
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/core/IModelProvider.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/core/IModelProvider.java
deleted file mode 100644
index 9abbdc9..0000000
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/core/IModelProvider.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.core;
-
-import org.eclipse.core.resources.IFile;
-
-/**
- * Classes that implement this interface are responsible for holding a table of
- * models associated with the underlying objects. They have several
- * responsibilities:
- * <ul>
- * <li>To hold model objects in one place
- * <li>To allow requesters to connect to the models or to disconnect from them.
- * <li>To notify interested parties when models are added and removed.
- * </ul>
- * Model providers are responsible for listening to the workspace, updating
- * models whose underlying resources have been updated, and removing them from
- * the table when those resources have been deleted.
- *
- * @deprecated This interface is not implemented within PDE and is scheduled for
- * deletion: https://bugs.eclipse.org/bugs/show_bug.cgi?id=541068
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @noreference This interface is scheduled for deletion.
- * @since 2.0
- */
-@Deprecated
-public interface IModelProvider {
- /**
- * Registers a listener that will be notified about changes in the managed
- * models.
- *
- * @param listener
- * the listener that will be registered
- */
- void addModelProviderListener(IModelProviderListener listener);
-
- /**
- * Returns the model for the provided file resource.
- *
- * @param file
- * the file resource we need the model for
- * @return the object that represents a structured representation of the
- * file content
- */
- public IModel getModel(IFile file);
-
- /**
- * Deregisters a listener from notification.
- *
- * @param listener
- * the listener to be deregistered
- */
- void removeModelProviderListener(IModelProviderListener listener);
-}
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/core/IModelProviderEvent.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/core/IModelProviderEvent.java
index 4baa585..43179ff 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/core/IModelProviderEvent.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/core/IModelProviderEvent.java
@@ -39,18 +39,20 @@
* Event is sent when the target platform changes
*
* @since 3.2
- * @deprecated Since the 4.4 Luna release, target platform changes are not tracked as model events
+ * @deprecated Since the 4.4 Luna release, target platform changes are not
+ * tracked as model events
*/
- @Deprecated
+ @Deprecated(forRemoval = true)
int TARGET_CHANGED = 0x8;
/**
* Event is sent when the target environment changes
*
* @since 3.5
- * @deprecated Since the 4.4 Luna release, target platform changes are not tracked as model events
+ * @deprecated Since the 4.4 Luna release, target platform changes are not
+ * tracked as model events
*/
- @Deprecated
+ @Deprecated(forRemoval = true)
int ENVIRONMENT_CHANGED = 0x10;
/**
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/core/target/LoadTargetDefinitionJob.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/core/target/LoadTargetDefinitionJob.java
index 1bacd6d..b14b060 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/core/target/LoadTargetDefinitionJob.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/core/target/LoadTargetDefinitionJob.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2018 IBM Corporation and others.
+ * Copyright (c) 2009, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -138,7 +138,6 @@
}
preferences.setValue(ICoreConstants.WORKSPACE_TARGET_HANDLE, memento);
- clearDeprecatedPreferences(preferences, subMon.split(3));
loadJRE(subMon.split(3));
@@ -152,40 +151,6 @@
}
/**
- * Clears any existing target preferences that have been deprecated in 4.4 Luna
- *
- * @param pref preference manager
- * @param monitor progress monitor
- */
- @SuppressWarnings("deprecation")
- private void clearDeprecatedPreferences(PDEPreferencesManager pref, IProgressMonitor monitor) {
- String empty = ""; //$NON-NLS-1$
- pref.setValue(ICoreConstants.ARCH, empty);
- pref.setValue(ICoreConstants.NL, empty);
- pref.setValue(ICoreConstants.OS, empty);
- pref.setValue(ICoreConstants.WS, empty);
-
- pref.setValue(ICoreConstants.PROGRAM_ARGS, empty);
- pref.setValue(ICoreConstants.VM_ARGS, empty);
-
- pref.setValue(ICoreConstants.TARGET_MODE, empty);
- pref.setValue(ICoreConstants.CHECKED_PLUGINS, empty);
- pref.setValue(ICoreConstants.CHECKED_VERSION_PLUGINS, empty);
-
- pref.setValue(ICoreConstants.VM_LAUNCHER_INI, empty);
- pref.setValue(ICoreConstants.IMPLICIT_DEPENDENCIES, empty);
-
- pref.setValue(ICoreConstants.ADDITIONAL_LOCATIONS, empty);
- pref.setValue(ICoreConstants.TARGET_PLATFORM_REALIZATION, empty);
-
- pref.setValue(ICoreConstants.POOLED_BUNDLES, empty);
- pref.setValue(ICoreConstants.POOLED_URLS, empty);
-
- pref.setValue(ICoreConstants.EXTERNAL_FEATURES, empty);
- pref.setValue(ICoreConstants.TARGET_PROFILE, empty);
- }
-
- /**
* Sets the workspace default JRE based on the target's JRE container.
*
* @param monitor progress monitor
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ICoreConstants.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ICoreConstants.java
index 1ac9d09..0db4fc1 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ICoreConstants.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ICoreConstants.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -18,9 +18,7 @@
import java.util.Locale;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
-import org.eclipse.pde.core.plugin.TargetPlatform;
import org.eclipse.pde.core.project.IBundleProjectDescription;
-import org.eclipse.pde.core.target.ITargetPlatformService;
import org.osgi.framework.Constants;
/**
@@ -28,134 +26,6 @@
*/
public interface ICoreConstants {
- // Target Platform
- /**
- * Preference key that stores the string path to the root location of the
- * target platform. Should be accessed through {@link TargetPlatform#getLocation()}.
- * @deprecated Since the 4.4 Luna release, target platform information is no longer stored in preferences. Instead use {@link ITargetPlatformService}.
- */
- @Deprecated
- String PLATFORM_PATH = "platform_path"; //$NON-NLS-1$
- /**
- * @deprecated Since the 4.4 Luna release, target platform information is no longer stored in preferences. Instead use {@link ITargetPlatformService}.
- */
- @Deprecated
- String TARGET_MODE = "target_mode"; //$NON-NLS-1$
- /**
- * @deprecated Since the 4.4 Luna release, target platform information is no longer stored in preferences. Instead use {@link ITargetPlatformService}.
- */
- @Deprecated
- String VALUE_USE_THIS = "useThis"; //$NON-NLS-1$
- /**
- * @deprecated Since the 4.4 Luna release, target platform information is no longer stored in preferences. Instead use {@link ITargetPlatformService}.
- */
- @Deprecated
- String VALUE_USE_OTHER = "useOther"; //$NON-NLS-1$
- /**
- * @deprecated Since the 4.4 Luna release, target platform information is no longer stored in preferences. Instead use {@link ITargetPlatformService}.
- */
- @Deprecated
- String CHECKED_PLUGINS = "checkedPlugins"; //$NON-NLS-1$
- /**
- * @deprecated Since the 4.4 Luna release, target platform information is no longer stored in preferences. Instead use {@link ITargetPlatformService}.
- */
- @Deprecated
- String VALUE_SAVED_NONE = "[savedNone]"; //$NON-NLS-1$
- /**
- * @deprecated Since the 4.4 Luna release, target platform information is no longer stored in preferences. Instead use {@link ITargetPlatformService}.
- */
- @Deprecated
- String VALUE_SAVED_ALL = "[savedAll]"; //$NON-NLS-1$
- /**
- * @deprecated Since the 4.4 Luna release, target platform information is no longer stored in preferences. Instead use {@link ITargetPlatformService}.
- */
- @Deprecated
- String VALUE_SAVED_SOME = "savedSome"; //$NON-NLS-1$
- /**
- * @since 3.6 - Bug 282708: [target] issues with two versions of the same bundle
- * @deprecated Since the 4.4 Luna release, target platform information is no longer stored in preferences. Instead use {@link ITargetPlatformService}.
- */
- @Deprecated
- String CHECKED_VERSION_PLUGINS = "checkedVersionPlugins"; //$NON-NLS-1$
- /**
- * @deprecated Since the 4.4 Luna release, target platform information is no longer stored in preferences. Instead use {@link ITargetPlatformService}.
- */
- @Deprecated
- String PROGRAM_ARGS = "program_args"; //$NON-NLS-1$
- /**
- * @deprecated Since the 4.4 Luna release, target platform information is no longer stored in preferences. Instead use {@link ITargetPlatformService}.
- */
- @Deprecated
- String VM_ARGS = "vm_args"; //$NON-NLS-1$
- /**
- * @deprecated Since the 4.4 Luna release, target platform information is no longer stored in preferences. Instead use {@link ITargetPlatformService}.
- */
- @Deprecated
- String VM_LAUNCHER_INI = "vm_launcher_ini"; //$NON-NLS-1$
- /**
- * @deprecated Since the 4.4 Luna release, target platform information is no longer stored in preferences. Instead use {@link ITargetPlatformService}.
- */
- @Deprecated
- String IMPLICIT_DEPENDENCIES = "implicit_dependencies"; //$NON-NLS-1$
- /**
- * @deprecated Since the 4.4 Luna release, target platform information is no longer stored in preferences. Instead use {@link ITargetPlatformService}.
- */
- @Deprecated
- String ADDITIONAL_LOCATIONS = "additional_locations"; //$NON-NLS-1$
- /**
- * @deprecated Since the 4.4 Luna release, target platform information is no longer stored in preferences. Instead use {@link ITargetPlatformService}.
- */
- @Deprecated
- String TARGET_PLATFORM_REALIZATION = "target_platform_realization"; //$NON-NLS-1$
- /**
- * @deprecated This preference was only used during 3.5, it has been replaced in 3.6 with {@link #POOLED_URLS}
- */
- @Deprecated
- String POOLED_BUNDLES = "pooled_bundles"; //$NON-NLS-1$
- /**
- * Comma separated list of bundle URLs used from the bundle pool.
- * @since 3.6
- * @deprecated Since the 4.4 Luna release, target platform information is no longer stored in preferences. Instead use {@link ITargetPlatformService}.
- */
- @Deprecated
- String POOLED_URLS = "pooled_urls"; //$NON-NLS-1$
- /**
- * List of feature ids and versions that are available in the target platform. Features
- * are comma separated, with each entry taking the form of [id]@[version]
- *
- * @since 3.6
- * @deprecated Since the 4.4 Luna release, target platform information is no longer stored in preferences. Instead use {@link ITargetPlatformService}.
- */
- @Deprecated
- String EXTERNAL_FEATURES = "external_features"; //$NON-NLS-1$
-
- // Target Environment
- /**
- * @deprecated Since the 4.4 Luna release, target platform information is no longer stored in preferences. Instead use {@link ITargetPlatformService}.
- */
- @Deprecated
- String OS = "org.eclipse.pde.ui.os"; //$NON-NLS-1$
- /**
- * @deprecated Since the 4.4 Luna release, target platform information is no longer stored in preferences. Instead use {@link ITargetPlatformService}.
- */
- @Deprecated
- String WS = "org.eclipse.pde.ui.ws"; //$NON-NLS-1$
- /**
- * @deprecated Since the 4.4 Luna release, target platform information is no longer stored in preferences. Instead use {@link ITargetPlatformService}.
- */
- @Deprecated
- String NL = "org.eclipse.pde.ui.nl"; //$NON-NLS-1$
- /**
- * @deprecated Since the 4.4 Luna release, target platform information is no longer stored in preferences. Instead use {@link ITargetPlatformService}.
- */
- @Deprecated
- String ARCH = "org.eclipse.pde.ui.arch"; //$NON-NLS-1$
- /**
- * @deprecated Since the 4.4 Luna release, target platform information is no longer stored in preferences. Instead use {@link ITargetPlatformService}.
- */
- @Deprecated
- String TARGET_PROFILE = "target.profile"; //$NON-NLS-1$
-
// Preferences to allow products to add additional options in the target environment combos
// Unknown if they are being used
String OS_EXTRA = "org.eclipse.pde.os.extra"; //$NON-NLS-1$
@@ -164,31 +34,31 @@
String ARCH_EXTRA = "org.eclipse.pde.arch.extra"; //$NON-NLS-1$
/** Constant for the string <code>extension</code> */
- public final static String EXTENSION_NAME = "extension"; //$NON-NLS-1$
+ String EXTENSION_NAME = "extension"; //$NON-NLS-1$
/** Constant for the string <code>plugin.xml</code> */
- public final static String PLUGIN_FILENAME_DESCRIPTOR = "plugin.xml"; //$NON-NLS-1$
+ String PLUGIN_FILENAME_DESCRIPTOR = "plugin.xml"; //$NON-NLS-1$
/** Constant for the string <code>feature.xml</code> */
- public final static String FEATURE_FILENAME_DESCRIPTOR = "feature.xml"; //$NON-NLS-1$
+ String FEATURE_FILENAME_DESCRIPTOR = "feature.xml"; //$NON-NLS-1$
/** Constant for the string <code>fragment.xml</code> */
- public final static String FRAGMENT_FILENAME_DESCRIPTOR = "fragment.xml"; //$NON-NLS-1$
+ String FRAGMENT_FILENAME_DESCRIPTOR = "fragment.xml"; //$NON-NLS-1$
/** Constant for the string <code>META-INF/MANIFEST.MF</code> */
- public final static String BUNDLE_FILENAME_DESCRIPTOR = "META-INF/MANIFEST.MF"; //$NON-NLS-1$
+ String BUNDLE_FILENAME_DESCRIPTOR = "META-INF/MANIFEST.MF"; //$NON-NLS-1$
/** Constant for the string <code>MANIFEST.MF</code> */
- public final static String MANIFEST_FILENAME = "MANIFEST.MF"; //$NON-NLS-1$
+ String MANIFEST_FILENAME = "MANIFEST.MF"; //$NON-NLS-1$
/** Constant for the string <code>.options</code> */
- public final static String OPTIONS_FILENAME = ".options"; //$NON-NLS-1$
+ String OPTIONS_FILENAME = ".options"; //$NON-NLS-1$
/** Constant for the string <code>manifest.mf</code> */
- public final static String MANIFEST_FILENAME_LOWER_CASE = MANIFEST_FILENAME.toLowerCase(Locale.ENGLISH);
+ String MANIFEST_FILENAME_LOWER_CASE = MANIFEST_FILENAME.toLowerCase(Locale.ENGLISH);
/** Constant for the string <code>build.properties</code> */
- public final static String BUILD_FILENAME_DESCRIPTOR = "build.properties"; //$NON-NLS-1$
+ String BUILD_FILENAME_DESCRIPTOR = "build.properties"; //$NON-NLS-1$
/**
* Default version number for plugin and feature
@@ -208,7 +78,7 @@
* new version.
* </p>
*/
- public final static String TARGET30 = "3.0"; //$NON-NLS-1$
+ String TARGET30 = "3.0"; //$NON-NLS-1$
/**
* Target version of <code>3.1</code>
@@ -223,7 +93,7 @@
* new version.
* </p>
*/
- public final static String TARGET31 = "3.1"; //$NON-NLS-1$
+ String TARGET31 = "3.1"; //$NON-NLS-1$
/**
* Target version of <code>3.2</code>
@@ -238,7 +108,7 @@
* new version.
* </p>
*/
- public final static String TARGET32 = "3.2"; //$NON-NLS-1$
+ String TARGET32 = "3.2"; //$NON-NLS-1$
/**
* Target version of <code>3.3</code>
@@ -253,7 +123,7 @@
* new version.
* </p>
*/
- public final static String TARGET33 = "3.3"; //$NON-NLS-1$
+ String TARGET33 = "3.3"; //$NON-NLS-1$
/**
* Target version of <code>3.4</code>
@@ -268,7 +138,7 @@
* new version.
* </p>
*/
- public final static String TARGET34 = "3.4"; //$NON-NLS-1$
+ String TARGET34 = "3.4"; //$NON-NLS-1$
/**
* Target version of <code>3.5</code>
@@ -283,7 +153,7 @@
* new version.
* </p>
*/
- public final static String TARGET35 = "3.5"; //$NON-NLS-1$
+ String TARGET35 = "3.5"; //$NON-NLS-1$
/**
* Target version of <code>3.6</code>
@@ -298,7 +168,7 @@
* new version.
* </p>
*/
- public final static String TARGET36 = "3.6"; //$NON-NLS-1$
+ String TARGET36 = "3.6"; //$NON-NLS-1$
/**
* Target version of <code>3.7</code>
@@ -313,7 +183,7 @@
* new version.
* </p>
*/
- public final static String TARGET37 = "3.7"; //$NON-NLS-1$
+ String TARGET37 = "3.7"; //$NON-NLS-1$
/**
* Target version of <code>3.8</code>
@@ -328,7 +198,7 @@
* new version.
* </p>
*/
- public final static String TARGET38 = "3.8"; //$NON-NLS-1$
+ String TARGET38 = "3.8"; //$NON-NLS-1$
/**
* The highest version of of Eclipse that PDE recognizes as having a special file structure. The value of
@@ -342,7 +212,7 @@
* NewProjectCreationPage, and {@link IBundleProjectDescription} must all be updated.
* </p>
*/
- public final static String TARGET_VERSION_LATEST = TARGET38;
+ String TARGET_VERSION_LATEST = TARGET38;
/**
* Preference key that stores a list of user specified source locations.
@@ -352,13 +222,13 @@
@Deprecated
String P_SOURCE_LOCATIONS = "source_locations"; //$NON-NLS-1$
- public final static String EQUINOX = "Equinox"; //$NON-NLS-1$
+ String EQUINOX = "Equinox"; //$NON-NLS-1$
// project preferences
- public static final String SELFHOSTING_BIN_EXCLUDES = "selfhosting.binExcludes"; //$NON-NLS-1$
- public static final String EQUINOX_PROPERTY = "pluginProject.equinox"; //$NON-NLS-1$
- public static final String EXTENSIONS_PROPERTY = "pluginProject.extensions"; //$NON-NLS-1$
- public static final String RESOLVE_WITH_REQUIRE_BUNDLE = "resolve.requirebundle"; //$NON-NLS-1$
+ String SELFHOSTING_BIN_EXCLUDES = "selfhosting.binExcludes"; //$NON-NLS-1$
+ String EQUINOX_PROPERTY = "pluginProject.equinox"; //$NON-NLS-1$
+ String EXTENSIONS_PROPERTY = "pluginProject.extensions"; //$NON-NLS-1$
+ String RESOLVE_WITH_REQUIRE_BUNDLE = "resolve.requirebundle"; //$NON-NLS-1$
/**
* Configures launch shortcuts visible in the manifest editor for a project.
@@ -367,7 +237,7 @@
*
* @since 3.6
*/
- public static final String MANIFEST_LAUNCH_SHORTCUTS = "manifest.launchShortcuts"; //$NON-NLS-1$
+ String MANIFEST_LAUNCH_SHORTCUTS = "manifest.launchShortcuts"; //$NON-NLS-1$
/**
* Configures the export wizard used in the manifest editor for a project.
@@ -375,124 +245,124 @@
*
* @since 3.6
*/
- public static final String MANIFEST_EXPORT_WIZARD = "manifest.exportWizard"; //$NON-NLS-1$
+ String MANIFEST_EXPORT_WIZARD = "manifest.exportWizard"; //$NON-NLS-1$
// for backwards compatibility with Eclipse 3.0 bundle manifest files
- public final static String PROVIDE_PACKAGE = "Provide-Package"; //$NON-NLS-1$
- public final static String REPROVIDE_ATTRIBUTE = "reprovide"; //$NON-NLS-1$
- public final static String OPTIONAL_ATTRIBUTE = "optional"; //$NON-NLS-1$
- public final static String REQUIRE_PACKAGES_ATTRIBUTE = "require-packages"; //$NON-NLS-1$
- public final static String SINGLETON_ATTRIBUTE = "singleton"; //$NON-NLS-1$
- public final static String PACKAGE_SPECIFICATION_VERSION = "specification-version"; //$NON-NLS-1$
- public static final String IMPORT_SERVICE = "Import-Service"; //$NON-NLS-1$
- public static final String EXPORT_SERVICE = "Export-Service"; //$NON-NLS-1$
+ String PROVIDE_PACKAGE = "Provide-Package"; //$NON-NLS-1$
+ String REPROVIDE_ATTRIBUTE = "reprovide"; //$NON-NLS-1$
+ String OPTIONAL_ATTRIBUTE = "optional"; //$NON-NLS-1$
+ String REQUIRE_PACKAGES_ATTRIBUTE = "require-packages"; //$NON-NLS-1$
+ String SINGLETON_ATTRIBUTE = "singleton"; //$NON-NLS-1$
+ String PACKAGE_SPECIFICATION_VERSION = "specification-version"; //$NON-NLS-1$
+ String IMPORT_SERVICE = "Import-Service"; //$NON-NLS-1$
+ String EXPORT_SERVICE = "Export-Service"; //$NON-NLS-1$
// Equinox-specific headers
- public final static String EXTENSIBLE_API = "Eclipse-ExtensibleAPI"; //$NON-NLS-1$
- public final static String PATCH_FRAGMENT = "Eclipse-PatchFragment"; //$NON-NLS-1$
- public final static String PLUGIN_CLASS = "Plugin-Class"; //$NON-NLS-1$
+ String EXTENSIBLE_API = "Eclipse-ExtensibleAPI"; //$NON-NLS-1$
+ String PATCH_FRAGMENT = "Eclipse-PatchFragment"; //$NON-NLS-1$
+ String PLUGIN_CLASS = "Plugin-Class"; //$NON-NLS-1$
/**
* The 'Eclipse-AutoStart=true' header was used up to and including 3.1 to mean LAZY.
* However, this was a poorly named header, since "auto-start" sounds UN-LAZY, and
* was replaced with 'Eclipse-LazyStart=true' in 3.2.
*/
- public final static String ECLIPSE_AUTOSTART = "Eclipse-AutoStart"; //$NON-NLS-1$
+ String ECLIPSE_AUTOSTART = "Eclipse-AutoStart"; //$NON-NLS-1$
/**
* The 'Eclipse-LazyStart=true' header replaced the 'Eclipse-AutoStart' header
* with a better name in 3.2. And since 3.4 (OSGi R4.1), the 'Bundle-ActivationPolicy: lazy'
* replaces all of these.
*/
- public final static String ECLIPSE_LAZYSTART = "Eclipse-LazyStart"; //$NON-NLS-1$
- public final static String ECLIPSE_JREBUNDLE = "Eclipse-JREBundle"; //$NON-NLS-1$
- public static final String ECLIPSE_BUDDY_POLICY = "Eclipse-BuddyPolicy"; //$NON-NLS-1$
- public static final String ECLIPSE_REGISTER_BUDDY = "Eclipse-RegisterBuddy"; //$NON-NLS-1$
- public static final String ECLIPSE_GENERIC_CAPABILITY = "Eclipse-GenericCapability"; //$NON-NLS-1$
- public static final String ECLIPSE_GENERIC_REQUIRED = "Eclipse-GenericRequire"; //$NON-NLS-1$
- public static final String PLATFORM_FILTER = "Eclipse-PlatformFilter"; //$NON-NLS-1$
- public static final String ECLIPSE_SOURCE_BUNDLE = "Eclipse-SourceBundle"; //$NON-NLS-1$
- public static final String ECLIPSE_SYSTEM_BUNDLE = "Eclipse-SystemBundle"; //$NON-NLS-1$
- public static final String ECLIPSE_BUNDLE_SHAPE = "Eclipse-BundleShape"; //$NON-NLS-1$
- public static final String ECLIPSE_SOURCE_REFERENCES = "Eclipse-SourceReferences"; //$NON-NLS-1$
- public static final String SERVICE_COMPONENT = "Service-Component"; //$NON-NLS-1$
- public static final String AUTOMATIC_MODULE_NAME = "Automatic-Module-Name"; //$NON-NLS-1$
+ String ECLIPSE_LAZYSTART = "Eclipse-LazyStart"; //$NON-NLS-1$
+ String ECLIPSE_JREBUNDLE = "Eclipse-JREBundle"; //$NON-NLS-1$
+ String ECLIPSE_BUDDY_POLICY = "Eclipse-BuddyPolicy"; //$NON-NLS-1$
+ String ECLIPSE_REGISTER_BUDDY = "Eclipse-RegisterBuddy"; //$NON-NLS-1$
+ String ECLIPSE_GENERIC_CAPABILITY = "Eclipse-GenericCapability"; //$NON-NLS-1$
+ String ECLIPSE_GENERIC_REQUIRED = "Eclipse-GenericRequire"; //$NON-NLS-1$
+ String PLATFORM_FILTER = "Eclipse-PlatformFilter"; //$NON-NLS-1$
+ String ECLIPSE_SOURCE_BUNDLE = "Eclipse-SourceBundle"; //$NON-NLS-1$
+ String ECLIPSE_SYSTEM_BUNDLE = "Eclipse-SystemBundle"; //$NON-NLS-1$
+ String ECLIPSE_BUNDLE_SHAPE = "Eclipse-BundleShape"; //$NON-NLS-1$
+ String ECLIPSE_SOURCE_REFERENCES = "Eclipse-SourceReferences"; //$NON-NLS-1$
+ String SERVICE_COMPONENT = "Service-Component"; //$NON-NLS-1$
+ String AUTOMATIC_MODULE_NAME = "Automatic-Module-Name"; //$NON-NLS-1$
// Equinox-specific system properties
- public static final String OSGI_SYSTEM_BUNDLE = "osgi.system.bundle"; //$NON-NLS-1$
- public static final String OSGI_OS = "osgi.os"; //$NON-NLS-1$
- public static final String OSGI_WS = "osgi.ws"; //$NON-NLS-1$
- public static final String OSGI_NL = "osgi.nl"; //$NON-NLS-1$
- public static final String OSGI_ARCH = "osgi.arch"; //$NON-NLS-1$
- public static final String OSGI_RESOLVE_OPTIONAL = "osgi.resolveOptional"; //$NON-NLS-1$
- public static final String OSGI_RESOLVER_MODE = "osgi.resolverMode"; //$NON-NLS-1$
+ String OSGI_SYSTEM_BUNDLE = "osgi.system.bundle"; //$NON-NLS-1$
+ String OSGI_OS = "osgi.os"; //$NON-NLS-1$
+ String OSGI_WS = "osgi.ws"; //$NON-NLS-1$
+ String OSGI_NL = "osgi.nl"; //$NON-NLS-1$
+ String OSGI_ARCH = "osgi.arch"; //$NON-NLS-1$
+ String OSGI_RESOLVE_OPTIONAL = "osgi.resolveOptional"; //$NON-NLS-1$
+ String OSGI_RESOLVER_MODE = "osgi.resolverMode"; //$NON-NLS-1$
// Equinox-specific directives
- public static final String INTERNAL_DIRECTIVE = "x-internal"; //$NON-NLS-1$
- public static final String FRIENDS_DIRECTIVE = "x-friends"; //$NON-NLS-1$
+ String INTERNAL_DIRECTIVE = "x-internal"; //$NON-NLS-1$
+ String FRIENDS_DIRECTIVE = "x-friends"; //$NON-NLS-1$
- public static final String SHAPE_JAR = "jar"; //$NON-NLS-1$
- public static final String SHAPE_DIR = "dir"; //$NON-NLS-1$
- public static final String[] SHAPE_VALUES = new String[] {SHAPE_DIR, SHAPE_JAR};
+ String SHAPE_JAR = "jar"; //$NON-NLS-1$
+ String SHAPE_DIR = "dir"; //$NON-NLS-1$
+ String[] SHAPE_VALUES = new String[] {SHAPE_DIR, SHAPE_JAR};
- public static final String[] TRANSLATABLE_HEADERS = new String[] {Constants.BUNDLE_VENDOR, Constants.BUNDLE_NAME, Constants.BUNDLE_DESCRIPTION, Constants.BUNDLE_COPYRIGHT, Constants.BUNDLE_CATEGORY, Constants.BUNDLE_CONTACTADDRESS};
+ String[] TRANSLATABLE_HEADERS = new String[] {Constants.BUNDLE_VENDOR, Constants.BUNDLE_NAME, Constants.BUNDLE_DESCRIPTION, Constants.BUNDLE_COPYRIGHT, Constants.BUNDLE_CATEGORY, Constants.BUNDLE_CONTACTADDRESS};
// EASTER EGG
- public static final String[] EE_TOKENS = new String[] {"wassim", "zx", "bbauman", "cherie", "jlb", "cwindatt" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+ String[] EE_TOKENS = new String[] {"wassim", "zx", "bbauman", "cherie", "jlb", "cwindatt" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
};
// Common folder names
- public static String MANIFEST_FOLDER_NAME = "META-INF/"; //$NON-NLS-1$
- public static String OSGI_INF_FOLDER_NAME = "OSGI-INF/"; //$NON-NLS-1$
- public static String FEATURE_FOLDER_NAME = "features"; //$NON-NLS-1$
+ String MANIFEST_FOLDER_NAME = "META-INF/"; //$NON-NLS-1$
+ String OSGI_INF_FOLDER_NAME = "OSGI-INF/"; //$NON-NLS-1$
+ String FEATURE_FOLDER_NAME = "features"; //$NON-NLS-1$
// Common paths
- public static IPath MANIFEST_PATH = new Path(BUNDLE_FILENAME_DESCRIPTOR);
- public static IPath PLUGIN_PATH = new Path(PLUGIN_FILENAME_DESCRIPTOR);
- public static IPath FRAGMENT_PATH = new Path(FRAGMENT_FILENAME_DESCRIPTOR);
- public static IPath FEATURE_PATH = new Path(FEATURE_FILENAME_DESCRIPTOR);
- public static IPath BUILD_PROPERTIES_PATH = new Path(BUILD_FILENAME_DESCRIPTOR);
- public static IPath OSGI_INF_PATH = new Path(OSGI_INF_FOLDER_NAME);
+ IPath MANIFEST_PATH = new Path(BUNDLE_FILENAME_DESCRIPTOR);
+ IPath PLUGIN_PATH = new Path(PLUGIN_FILENAME_DESCRIPTOR);
+ IPath FRAGMENT_PATH = new Path(FRAGMENT_FILENAME_DESCRIPTOR);
+ IPath FEATURE_PATH = new Path(FEATURE_FILENAME_DESCRIPTOR);
+ IPath BUILD_PROPERTIES_PATH = new Path(BUILD_FILENAME_DESCRIPTOR);
+ IPath OSGI_INF_PATH = new Path(OSGI_INF_FOLDER_NAME);
// Extension point identifiers
- public static final String EXTENSION_POINT_SOURCE = PDECore.PLUGIN_ID + ".source"; //$NON-NLS-1$
- public static final String EXTENSION_POINT_BUNDLE_IMPORTERS = PDECore.PLUGIN_ID + ".bundleImporters"; //$NON-NLS-1$
+ String EXTENSION_POINT_SOURCE = PDECore.PLUGIN_ID + ".source"; //$NON-NLS-1$
+ String EXTENSION_POINT_BUNDLE_IMPORTERS = PDECore.PLUGIN_ID + ".bundleImporters"; //$NON-NLS-1$
// file extensions
/**
* File extension for target definitions
*/
- public static final String TARGET_FILE_EXTENSION = "target"; //$NON-NLS-1$
+ String TARGET_FILE_EXTENSION = "target"; //$NON-NLS-1$
/**
* Preference key for the active workspace target platform handle memento. If not set,
* old target preferences will be used to create a default. If no external bundles are
* wanted, this value should be set to {@link #NO_TARGET}.
*/
- public static final String WORKSPACE_TARGET_HANDLE = "workspace_target_handle"; //$NON-NLS-1$
+ String WORKSPACE_TARGET_HANDLE = "workspace_target_handle"; //$NON-NLS-1$
/**
* Preference key for the workspace bundle overriding target bundle for the
* same id
*/
- public static final String WORKSPACE_PLUGINS_OVERRIDE_TARGET = "workspace_plugins_override_target"; //$NON-NLS-1$
+ String WORKSPACE_PLUGINS_OVERRIDE_TARGET = "workspace_plugins_override_target"; //$NON-NLS-1$
/**
* Boolean preference whether API analysis has been disabled
*/
- public static final String DISABLE_API_ANALYSIS_BUILDER = "Preferences.MainPage.disableAPIAnalysisBuilder";//$NON-NLS-1$
+ String DISABLE_API_ANALYSIS_BUILDER = "Preferences.MainPage.disableAPIAnalysisBuilder";//$NON-NLS-1$
/**
* Explicit preference value for {@link #WORKSPACE_TARGET_HANDLE} when the user chooses no
* target for the workspace (no external bundles).
*/
- public static final String NO_TARGET = "NO_TARGET"; //$NON-NLS-1$
+ String NO_TARGET = "NO_TARGET"; //$NON-NLS-1$
/**
* Preference key for the patterns that determine if a plugin project should be
* treated as test code
*/
- public static final String TEST_PLUGIN_PATTERN = "test_plugin_pattern"; //$NON-NLS-1$
+ String TEST_PLUGIN_PATTERN = "test_plugin_pattern"; //$NON-NLS-1$
// default value for
- public static final String TEST_PLUGIN_PATTERN_DEFAULTVALUE = "[.]test[s]?$|[.]tests[.]"; //$NON-NLS-1$
+ String TEST_PLUGIN_PATTERN_DEFAULTVALUE = "[.]test[s]?$|[.]tests[.]"; //$NON-NLS-1$
}
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/DirectoryBundleContainer.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/DirectoryBundleContainer.java
index aaa537a..d97d2e7 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/DirectoryBundleContainer.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/DirectoryBundleContainer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2018 IBM Corporation and others.
+ * Copyright (c) 2008, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -11,6 +11,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Karsten Thoms - Bug#535325
+ * Christoph Läubrich - Bug 568865 - [target] add advanced editing capabilities for custom target platforms
*******************************************************************************/
package org.eclipse.pde.internal.core.target;
@@ -177,4 +178,8 @@
return root;
}
+ public void reload() {
+ clearResolutionStatus();
+ }
+
}
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/FeatureBundleContainer.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/FeatureBundleContainer.java
index 43f936b..50d1be3 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/FeatureBundleContainer.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/FeatureBundleContainer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2017 IBM Corporation and others.
+ * Copyright (c) 2009, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Christoph Läubrich - Bug 568865 - [target] add advanced editing capabilities for custom target platforms
*******************************************************************************/
package org.eclipse.pde.internal.core.target;
@@ -256,4 +257,8 @@
public String[] getVMArguments() {
return null;
}
+
+ public void reload() {
+ clearResolutionStatus();
+ }
}
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/IUBundleContainer.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/IUBundleContainer.java
index 55a8699..d427da3 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/IUBundleContainer.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/IUBundleContainer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 IBM Corporation and others.
+ * Copyright (c) 2009, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -14,6 +14,7 @@
* EclipseSource, Inc. - ongoing development
* Manumitting Technologies Inc - bug 437726: wrong error messages opening target definition
* Alexander Fedorov <alexander.fedorov@arsysop.ru> - Bug 542425
+ * Christoph Läubrich - Bug 568865 - [target] add advanced editing capabilities for custom target platforms
*******************************************************************************/
package org.eclipse.pde.internal.core.target;
@@ -385,7 +386,7 @@
* @return whether this container was changed as part of this update and must be resolved
* @exception CoreException if unable to retrieve IU's
*/
- public synchronized boolean update(Set<Object> toUpdate, IProgressMonitor monitor) throws CoreException {
+ public synchronized boolean update(Set<String> toUpdate, IProgressMonitor monitor) throws CoreException {
SubMonitor progress = SubMonitor.convert(monitor, 100);
IQueryable<IInstallableUnit> source = P2TargetUtils.getQueryableMetadata(fRepos, progress.split(30));
boolean updated = false;
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/ProfileBundleContainer.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/ProfileBundleContainer.java
index 901b8f8..d57eb4a 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/ProfileBundleContainer.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/ProfileBundleContainer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2017 IBM Corporation and others.
+ * Copyright (c) 2008, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Christoph Läubrich - Bug 568865 - [target] add advanced editing capabilities for custom target platforms
*******************************************************************************/
package org.eclipse.pde.internal.core.target;
@@ -414,4 +415,8 @@
.append(fConfiguration == null ? "Default Configuration" : fConfiguration).toString(); //$NON-NLS-1$
}
+ public void reload() {
+ clearResolutionStatus();
+ }
+
}
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetPlatformService.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetPlatformService.java
index 005d33e..2d46f9c 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetPlatformService.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetPlatformService.java
@@ -32,7 +32,6 @@
import java.util.Map;
import java.util.Objects;
import java.util.Set;
-import java.util.StringTokenizer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceProxy;
@@ -58,7 +57,6 @@
import org.eclipse.osgi.service.datalocation.Location;
import org.eclipse.osgi.util.NLS;
import org.eclipse.pde.core.plugin.IPluginModelBase;
-import org.eclipse.pde.core.plugin.PluginRegistry;
import org.eclipse.pde.core.target.ITargetDefinition;
import org.eclipse.pde.core.target.ITargetHandle;
import org.eclipse.pde.core.target.ITargetLocation;
@@ -68,10 +66,8 @@
import org.eclipse.pde.core.target.TargetEvents;
import org.eclipse.pde.internal.core.ICoreConstants;
import org.eclipse.pde.internal.core.PDECore;
-import org.eclipse.pde.internal.core.PDECoreMessages;
import org.eclipse.pde.internal.core.PDEPreferencesManager;
import org.eclipse.pde.internal.core.TargetDefinitionManager;
-import org.eclipse.pde.internal.core.TargetPlatformHelper;
import org.osgi.service.prefs.BackingStoreException;
/**
@@ -372,20 +368,10 @@
defaultTarget.setName(Messages.TargetPlatformService_7);
saveTargetDefinition(defaultTarget);
- // Add target from preferences
- TargetDefinition preferencesTarget = (TargetDefinition) newTargetFromPreferences();
- if (preferencesTarget != null) {
- if (PDECore.DEBUG_MODEL) {
- System.out.println("Old target preferences found, loading them into active target."); //$NON-NLS-1$
- }
- preferencesTarget.setName(PDECoreMessages.PluginModelManager_0);
- saveTargetDefinition(preferencesTarget);
- }
// Set active platform
PDEPreferencesManager preferences = PDECore.getDefault().getPreferencesManager();
- ITargetHandle active = preferencesTarget != null ? preferencesTarget.getHandle()
- : defaultTarget.getHandle();
+ ITargetHandle active = defaultTarget.getHandle();
preferences.setValue(ICoreConstants.WORKSPACE_TARGET_HANDLE, active.getMemento());
} catch (CoreException e) {
PDECore.log(e);
@@ -443,195 +429,6 @@
}
}
- /**
- * Returns a target definition initialized with existing settings from the deprecated
- * target platform preferences or <code>null</code> if no deprecated preferences are
- * found.
- *
- * @return a target definition initialized with existing settings or <code>null</code>
- */
- @SuppressWarnings("deprecation")
- public ITargetDefinition newTargetFromPreferences() {
- PDEPreferencesManager preferences = PDECore.getDefault().getPreferencesManager();
- // See if the old preference for the primary target platform location exist
- boolean useThis = preferences.getString(ICoreConstants.TARGET_MODE).equals(ICoreConstants.VALUE_USE_THIS);
- String platformPath = preferences.getString(ICoreConstants.PLATFORM_PATH);
- if (useThis || (platformPath != null && platformPath.length() > 0)) {
- ITargetDefinition target = newTarget();
- initializeArgumentsInfo(preferences, target);
- initializeEnvironmentInfo(preferences, target);
- initializeImplicitInfo(preferences, target);
- initializeLocationInfo(preferences, target);
- initializeAdditionalLocsInfo(preferences, target);
- initializeJREInfo(target);
- initializePluginContent(preferences, target);
- return target;
- }
- return null;
- }
-
- /**
- * Returns the given string or <code>null</code> if the empty string.
- *
- * @param value
- * @return value or <code>null</code>
- */
- private String getValueOrNull(String value) {
- if (value == null) {
- return null;
- }
- if (value.length() == 0) {
- return null;
- }
- return value;
- }
-
- @SuppressWarnings("deprecation")
- private void initializeArgumentsInfo(PDEPreferencesManager preferences, ITargetDefinition target) {
- target.setProgramArguments(getValueOrNull(preferences.getString(ICoreConstants.PROGRAM_ARGS)));
- StringBuilder result = new StringBuilder();
- String vmArgs = getValueOrNull(preferences.getString(ICoreConstants.VM_ARGS));
- if (vmArgs != null) {
- result.append(vmArgs);
- }
- if (preferences.getBoolean(ICoreConstants.VM_LAUNCHER_INI)) {
- // hack on the arguments from eclipse.ini
- result.append(TargetPlatformHelper.getIniVMArgs());
- }
- if (result.length() == 0) {
- target.setVMArguments(null);
- } else {
- target.setVMArguments(result.toString());
- }
- }
-
- @SuppressWarnings("deprecation")
- private void initializeEnvironmentInfo(PDEPreferencesManager preferences, ITargetDefinition target) {
- target.setOS(getValueOrNull(preferences.getString(ICoreConstants.OS)));
- target.setWS(getValueOrNull(preferences.getString(ICoreConstants.WS)));
- target.setNL(getValueOrNull(preferences.getString(ICoreConstants.NL)));
- target.setArch(getValueOrNull(preferences.getString(ICoreConstants.ARCH)));
- }
-
- @SuppressWarnings("deprecation")
- private void initializeImplicitInfo(PDEPreferencesManager preferences, ITargetDefinition target) {
- String value = preferences.getString(ICoreConstants.IMPLICIT_DEPENDENCIES);
- if (value.length() > 0) {
- StringTokenizer tokenizer = new StringTokenizer(value, ","); //$NON-NLS-1$
- NameVersionDescriptor[] plugins = new NameVersionDescriptor[tokenizer.countTokens()];
- int i = 0;
- while (tokenizer.hasMoreTokens()) {
- String id = tokenizer.nextToken();
- plugins[i++] = new NameVersionDescriptor(id, null);
- }
- target.setImplicitDependencies(plugins);
- }
- }
-
- @SuppressWarnings("deprecation")
- private void initializeLocationInfo(PDEPreferencesManager preferences, ITargetDefinition target) {
- boolean useThis = preferences.getString(ICoreConstants.TARGET_MODE).equals(ICoreConstants.VALUE_USE_THIS);
- boolean profile = preferences.getBoolean(ICoreConstants.TARGET_PLATFORM_REALIZATION);
- String home = null;
- // Target weaving
- Location configArea = Platform.getConfigurationLocation();
- String configLocation = null;
- if (configArea != null) {
- configLocation = configArea.getURL().getFile();
- }
- if (configLocation != null) {
- Location location = Platform.getInstallLocation();
- if (location != null) {
- URL url = location.getURL();
- if (url != null) {
- IPath installPath = new Path(url.getFile());
- IPath configPath = new Path(configLocation);
- if (installPath.isPrefixOf(configPath)) {
- // if it is the default configuration area, do not specify explicitly
- configPath = configPath.removeFirstSegments(installPath.segmentCount());
- configPath = configPath.setDevice(null);
- if (configPath.segmentCount() == 1 && configPath.lastSegment().equals("configuration")) { //$NON-NLS-1$
- configLocation = null;
- }
- }
- }
- }
- }
- if (useThis) {
- home = "${eclipse_home}"; //$NON-NLS-1$
- } else {
- home = preferences.getString(ICoreConstants.PLATFORM_PATH);
- }
- ITargetLocation primary = null;
- if (profile) {
- primary = newProfileLocation(home, configLocation);
- } else {
- primary = newDirectoryLocation(home);
- }
- target.setName(Messages.TargetPlatformService_5);
- target.setTargetLocations(new ITargetLocation[] {primary});
- }
-
- @SuppressWarnings("deprecation")
- private void initializeAdditionalLocsInfo(PDEPreferencesManager preferences, ITargetDefinition target) {
- String additional = preferences.getString(ICoreConstants.ADDITIONAL_LOCATIONS);
- StringTokenizer tokenizer = new StringTokenizer(additional, ","); //$NON-NLS-1$
- int size = tokenizer.countTokens();
- if (size > 0) {
- List<ITargetLocation> locations = new ArrayList<>(size + 1);
- ITargetLocation[] targetLocations = target.getTargetLocations();
- if (targetLocations != null) {
- locations.add(targetLocations[0]);
- }
- while (tokenizer.hasMoreTokens()) {
- locations.add(newDirectoryLocation(tokenizer.nextToken().trim()));
- }
- target.setTargetLocations(locations.toArray(targetLocations));
- }
- }
-
- private void initializeJREInfo(ITargetDefinition target) {
- target.setJREContainer(null);
- }
-
- @SuppressWarnings("deprecation")
- private void initializePluginContent(PDEPreferencesManager preferences, ITargetDefinition target) {
- String value = preferences.getString(ICoreConstants.CHECKED_PLUGINS);
- if (value.length() == 0 || value.equals(ICoreConstants.VALUE_SAVED_NONE)) {
- // no bundles
- target.setTargetLocations(null);
- return;
- }
- if (!value.equals(ICoreConstants.VALUE_SAVED_ALL)) {
- // restrictions on container
- IPluginModelBase[] models = PluginRegistry.getExternalModels();
- ArrayList<NameVersionDescriptor> list = new ArrayList<>(models.length);
- Set<String> disabledIDs = new HashSet<>();
- for (int i = 0; i < models.length; i++) {
- if (!models[i].isEnabled()) {
- disabledIDs.add(models[i].getPluginBase().getId());
- }
- }
- for (IPluginModelBase model : models) {
- if (model.isEnabled()) {
- String id = model.getPluginBase().getId();
- if (id != null) {
- if (disabledIDs.contains(id)) {
- // include version info since some versions are disabled
- list.add(new NameVersionDescriptor(id, model.getPluginBase().getVersion()));
- } else {
- list.add(new NameVersionDescriptor(id, null));
- }
- }
- }
- }
- if (!list.isEmpty()) {
- target.setIncluded(list.toArray(new NameVersionDescriptor[list.size()]));
- }
- }
-
- }
-
@Override
public ITargetDefinition newDefaultTarget() {
ITargetDefinition target = newTarget();
diff --git a/ui/org.eclipse.pde.junit.runtime/META-INF/MANIFEST.MF b/ui/org.eclipse.pde.junit.runtime/META-INF/MANIFEST.MF
index f6b0f79..4515057 100644
--- a/ui/org.eclipse.pde.junit.runtime/META-INF/MANIFEST.MF
+++ b/ui/org.eclipse.pde.junit.runtime/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.pde.junit.runtime; singleton:=true
-Bundle-Version: 3.5.900.qualifier
+Bundle-Version: 3.5.1000.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Require-Bundle: org.eclipse.jdt.junit.runtime;bundle-version="[3.5.0,4.0.0)",
diff --git a/ui/org.eclipse.pde.junit.runtime/pom.xml b/ui/org.eclipse.pde.junit.runtime/pom.xml
index c46ce06..a5122d6 100644
--- a/ui/org.eclipse.pde.junit.runtime/pom.xml
+++ b/ui/org.eclipse.pde.junit.runtime/pom.xml
@@ -19,6 +19,6 @@
</parent>
<groupId>org.eclipse.pde</groupId>
<artifactId>org.eclipse.pde.junit.runtime</artifactId>
- <version>3.5.900-SNAPSHOT</version>
+ <version>3.5.1000-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/ui/org.eclipse.pde.junit.runtime/src/org/eclipse/pde/internal/junit/runtime/PDEJUnitRuntimePlugin.java b/ui/org.eclipse.pde.junit.runtime/src/org/eclipse/pde/internal/junit/runtime/PDEJUnitRuntimePlugin.java
index 58f6b37..22e8747 100644
--- a/ui/org.eclipse.pde.junit.runtime/src/org/eclipse/pde/internal/junit/runtime/PDEJUnitRuntimePlugin.java
+++ b/ui/org.eclipse.pde.junit.runtime/src/org/eclipse/pde/internal/junit/runtime/PDEJUnitRuntimePlugin.java
@@ -13,7 +13,6 @@
*******************************************************************************/
package org.eclipse.pde.internal.junit.runtime;
-import org.eclipse.ui.internal.Workbench;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.ui.testing.TestableObject;
import org.osgi.framework.BundleActivator;
@@ -96,7 +95,7 @@
* application lifecycle.
* <p>
* It is recommended the testable object is obtained via service
- * over {@link Workbench#getWorkbenchTestable()} to avoid the
+ * over Workbench#getWorkbenchTestable() to avoid the
* tests having a dependency on the Workbench.
* </p>
* @return TestableObject provided via service or <code>null</code>
diff --git a/ui/org.eclipse.pde.runtime/META-INF/MANIFEST.MF b/ui/org.eclipse.pde.runtime/META-INF/MANIFEST.MF
index c7bd38d..986daea 100644
--- a/ui/org.eclipse.pde.runtime/META-INF/MANIFEST.MF
+++ b/ui/org.eclipse.pde.runtime/META-INF/MANIFEST.MF
@@ -2,13 +2,15 @@
Bundle-ManifestVersion: 2
Bundle-Name: %name
Bundle-SymbolicName: org.eclipse.pde.runtime; singleton:=true
-Bundle-Version: 3.7.0.qualifier
+Bundle-Version: 3.7.100.qualifier
Bundle-Activator: org.eclipse.pde.internal.runtime.PDERuntimePlugin
Bundle-Vendor: %provider-name
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.11.0,4.0.0)",
org.eclipse.ui;bundle-version="[3.3.0,4.0.0)",
org.eclipse.ui.forms;bundle-version="[3.3.0,4.0.0)",
+ org.eclipse.e4.ui.workbench;bundle-version="1.12.0",
+ org.eclipse.e4.ui.model.workbench;bundle-version="2.1.0",
org.eclipse.jdt.core;bundle-version="[3.3.0,4.0.0)";resolution:=optional,
org.eclipse.core.resources;bundle-version="[3.3.0,4.0.0)";resolution:=optional,
org.eclipse.jdt.ui;bundle-version="[3.3.0,4.0.0)";resolution:=optional,
diff --git a/ui/org.eclipse.pde.runtime/pom.xml b/ui/org.eclipse.pde.runtime/pom.xml
index ac4544a..84d1b4c 100644
--- a/ui/org.eclipse.pde.runtime/pom.xml
+++ b/ui/org.eclipse.pde.runtime/pom.xml
@@ -20,7 +20,7 @@
</parent>
<groupId>org.eclipse.pde</groupId>
<artifactId>org.eclipse.pde.runtime</artifactId>
- <version>3.7.0-SNAPSHOT</version>
+ <version>3.7.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<properties>
diff --git a/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActivePartSection.java b/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActivePartSection.java
index 2bf433b..92cf339 100644
--- a/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActivePartSection.java
+++ b/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActivePartSection.java
@@ -17,7 +17,8 @@
import java.lang.reflect.Field;
import java.util.*;
import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.runtime.Platform;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.workbench.modeling.EPartService;
import org.eclipse.osgi.util.NLS;
import org.eclipse.pde.internal.runtime.*;
import org.eclipse.pde.internal.runtime.spy.SpyFormToolkit;
@@ -25,11 +26,11 @@
import org.eclipse.ui.*;
import org.eclipse.ui.forms.widgets.*;
import org.eclipse.ui.handlers.HandlerUtil;
-import org.eclipse.ui.internal.PartSite;
-import org.eclipse.ui.internal.PopupMenuExtender;
+import org.eclipse.ui.internal.*;
import org.eclipse.ui.part.IPage;
import org.eclipse.ui.part.PageBookView;
import org.osgi.framework.Bundle;
+import org.osgi.framework.FrameworkUtil;
/**
* @since 3.4
@@ -60,12 +61,26 @@
//toolkit.createImageAction(section, part.getTitleImage());
+ // e4?
+ MPart mPart = null;
+ if (part instanceof E4PartWrapper) {
+ EPartService service = part.getSite().getService(EPartService.class);
+ mPart = service.findPart(part.getSite().getId());
+ }
+
StringBuilder buffer = new StringBuilder();
buffer.append("<form>"); //$NON-NLS-1$
// time to analyze the active part
- buffer.append(toolkit.createClassSection(text, NLS.bind(PDERuntimeMessages.SpyDialog_activePart_desc, partType),
- part.getClass()));
+ if (mPart == null || mPart.getObject() == null) {
+ buffer.append(toolkit.createClassSection(text,
+ NLS.bind(PDERuntimeMessages.SpyDialog_activePart_desc, partType), part.getClass()));
+ } else {
+ buffer.append(toolkit.createClassSection(text,
+ NLS.bind(PDERuntimeMessages.SpyDialog_activePart_desc, partType),
+ new Class<?>[] { part.getClass(), mPart.getObject().getClass() }));
+ }
+
if (part instanceof PageBookView) {
PageBookView outline = (PageBookView) part;
IPage currentPage = outline.getCurrentPage();
@@ -75,8 +90,13 @@
}
}
- // time to analyze the contributing plug-in
- final Bundle bundle = Platform.getBundle(part.getSite().getPluginId());
+ // Best effort to find the contributing plug-in
+ Bundle bundle = null;
+ if (mPart == null) {
+ bundle = FrameworkUtil.getBundle(part.getClass());
+ } else if (mPart.getObject() != null) {
+ bundle = FrameworkUtil.getBundle(mPart.getObject().getClass());
+ }
toolkit.generatePluginDetailsText(bundle, part.getSite().getId(), partType, buffer, text);
diff --git a/ui/org.eclipse.pde.ui.tests/META-INF/MANIFEST.MF b/ui/org.eclipse.pde.ui.tests/META-INF/MANIFEST.MF
index 7b89ab1..f0e26c8 100644
--- a/ui/org.eclipse.pde.ui.tests/META-INF/MANIFEST.MF
+++ b/ui/org.eclipse.pde.ui.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: PDE JUnit Tests
Bundle-SymbolicName: org.eclipse.pde.ui.tests; singleton:=true
-Bundle-Version: 3.11.100.qualifier
+Bundle-Version: 3.11.200.qualifier
Bundle-ClassPath: tests.jar
Bundle-Activator: org.eclipse.pde.ui.tests.PDETestsPlugin
Bundle-Vendor: Eclipse.org
diff --git a/ui/org.eclipse.pde.ui.tests/pom.xml b/ui/org.eclipse.pde.ui.tests/pom.xml
index 92ec977..644e0c5 100644
--- a/ui/org.eclipse.pde.ui.tests/pom.xml
+++ b/ui/org.eclipse.pde.ui.tests/pom.xml
@@ -19,7 +19,7 @@
</parent>
<groupId>org.eclipse.pde</groupId>
<artifactId>org.eclipse.pde.ui.tests</artifactId>
- <version>3.11.100-SNAPSHOT</version>
+ <version>3.11.200-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
<properties>
diff --git a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/performance/parts/SchemaTraversePerfTest.java b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/performance/parts/SchemaTraversePerfTest.java
index 5712285..fd3510a 100644
--- a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/performance/parts/SchemaTraversePerfTest.java
+++ b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/performance/parts/SchemaTraversePerfTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2017 IBM Corporation and others.
+ * Copyright (c) 2007, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -40,7 +40,7 @@
@Override
protected void executeTest() throws Exception {
- URLConnection connection = SchemaUtil.getURLConnection(fXSDFile.toURL());
+ URLConnection connection = SchemaUtil.getURLConnection(fXSDFile.toURI().toURL());
try (InputStream input = connection.getInputStream()) {
SAXParserWrapper parser = new SAXParserWrapper();
XMLDefaultHandler handler = new XMLDefaultHandler(true);
diff --git a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/target/MinimalTargetDefinitionResolutionTests.java b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/target/MinimalTargetDefinitionResolutionTests.java
index ed5feed..2f0fdd1 100644
--- a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/target/MinimalTargetDefinitionResolutionTests.java
+++ b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/target/MinimalTargetDefinitionResolutionTests.java
@@ -20,15 +20,13 @@
import static org.junit.Assert.assertTrue;
import java.io.File;
-import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.pde.core.plugin.TargetPlatform;
import org.eclipse.pde.core.target.*;
-import org.eclipse.pde.internal.core.ICoreConstants;
-import org.eclipse.pde.internal.core.PDECore;
import org.eclipse.pde.internal.core.target.IUBundleContainer;
-import org.eclipse.pde.internal.core.target.TargetPlatformService;
import org.junit.Test;
/**
@@ -169,29 +167,7 @@
}
- /**
- * Tests that if users *don't* have the old preference to append .ini VM
- * arguments, target definitions are migrated properly *without* the
- * arguments appended.
- */
- @SuppressWarnings("deprecation")
- @Test
- public void testVMArgumentsMigrationNoAppend() throws Exception {
- Preferences store = PDECore.getDefault().getPluginPreferences();
- boolean original = store.getBoolean(ICoreConstants.VM_LAUNCHER_INI);
- store.setValue(ICoreConstants.VM_LAUNCHER_INI, false);
- String originalTarget = store.getString(ICoreConstants.TARGET_MODE);
- store.setValue(ICoreConstants.TARGET_MODE, ICoreConstants.VALUE_USE_THIS);
- try {
- ITargetDefinition target = ((TargetPlatformService) getTargetService()).newTargetFromPreferences();
- assertNotNull("No target was created from old preferences", target);
- String vmArguments = target.getVMArguments();
- assertNull("Arguments should be empty", vmArguments);
- } finally {
- store.setValue(ICoreConstants.VM_LAUNCHER_INI, original);
- store.setValue(ICoreConstants.TARGET_MODE, originalTarget);
- }
- }
+
/**
* Tests that a target definition is in synch with the target platform.
diff --git a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/target/TargetDefinitionResolutionTests.java b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/target/TargetDefinitionResolutionTests.java
index e1e38db..34b0a73 100644
--- a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/target/TargetDefinitionResolutionTests.java
+++ b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/target/TargetDefinitionResolutionTests.java
@@ -19,13 +19,9 @@
import static org.junit.Assert.assertTrue;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.equinox.frameworkadmin.BundleInfo;
import org.eclipse.pde.core.plugin.TargetPlatform;
import org.eclipse.pde.core.target.*;
-import org.eclipse.pde.internal.core.*;
-import org.eclipse.pde.internal.core.target.TargetPlatformService;
import org.junit.Test;
public class TargetDefinitionResolutionTests extends MinimalTargetDefinitionResolutionTests {
@@ -109,28 +105,6 @@
}
}
- /**
- * Tests that if users have the old preference to append .ini VM arguments,
- * target definitions are migrated properly with the arguments appended.
- */
- @SuppressWarnings("deprecation")
- @Test
- public void testVMArgumentsMigrationAppend() throws Exception {
- IEclipsePreferences store = InstanceScope.INSTANCE.getNode(PDECore.PLUGIN_ID);
- boolean original = store.getBoolean(ICoreConstants.VM_LAUNCHER_INI, false);
- store.putBoolean(ICoreConstants.VM_LAUNCHER_INI, true);
- String originalTarget = store.get(ICoreConstants.TARGET_MODE, "");
- store.put(ICoreConstants.TARGET_MODE, ICoreConstants.VALUE_USE_THIS);
- try {
- ITargetDefinition target = ((TargetPlatformService) getTargetService()).newTargetFromPreferences();
- assertNotNull("No target was created from old preferences", target);
- String vmArguments = target.getVMArguments();
- String iniVmArgs = TargetPlatformHelper.getIniVMArgs();
- assertEquals(vmArguments, iniVmArgs);
- } finally {
- store.putBoolean(ICoreConstants.VM_LAUNCHER_INI, original);
- store.put(ICoreConstants.TARGET_MODE, originalTarget);
- }
- }
+
}
\ No newline at end of file
diff --git a/ui/org.eclipse.pde.ui/.settings/.api_filters b/ui/org.eclipse.pde.ui/.settings/.api_filters
index 5aed9df..69f3e9e 100644
--- a/ui/org.eclipse.pde.ui/.settings/.api_filters
+++ b/ui/org.eclipse.pde.ui/.settings/.api_filters
@@ -1,5 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<component id="org.eclipse.pde.ui" version="2">
+ <resource path="META-INF/MANIFEST.MF" type="org.eclipse.pde.core.IModelProvider">
+ <filter id="305422471">
+ <message_arguments>
+ <message_argument value="org.eclipse.pde.core.IModelProvider"/>
+ <message_argument value="org.eclipse.pde.ui_3.12.100"/>
+ </message_arguments>
+ </filter>
+ </resource>
<resource path="src/org/eclipse/pde/internal/ui/editor/category/SiteBundleAdapter.java" type="org.eclipse.pde.internal.ui.editor.category.SiteBundleAdapter">
<filter comment="PDE UI may use restricted code from PDE Core" id="574619656">
<message_arguments>
@@ -66,14 +74,6 @@
</message_arguments>
</filter>
</resource>
- <resource path="src/org/eclipse/pde/ui/launcher/AbstractPDELaunchConfiguration.java" type="org.eclipse.pde.ui.launcher.AbstractPDELaunchConfiguration">
- <filter comment="Bug 564563 - Mark deprecated API from o.e.pde.ui.launcher for removal" id="336744520">
- <message_arguments>
- <message_argument value="@noextend"/>
- <message_argument value="org.eclipse.pde.ui.launcher.AbstractPDELaunchConfiguration"/>
- </message_arguments>
- </filter>
- </resource>
<resource path="src/org/eclipse/pde/ui/launcher/ConfigurationTab.java" type="org.eclipse.pde.ui.launcher.ConfigurationTab">
<filter comment="Code was moved to pde.launching, but we can't make breaking API changes" id="574668824">
<message_arguments>
@@ -83,32 +83,6 @@
</message_arguments>
</filter>
</resource>
- <resource path="src/org/eclipse/pde/ui/launcher/EclipseApplicationLaunchConfiguration.java" type="org.eclipse.pde.ui.launcher.EclipseApplicationLaunchConfiguration">
- <filter comment="Bug 564563 - Mark deprecated API from o.e.pde.ui.launcher for removal" id="336744520">
- <message_arguments>
- <message_argument value="@noextend"/>
- <message_argument value="org.eclipse.pde.ui.launcher.EclipseApplicationLaunchConfiguration"/>
- </message_arguments>
- </filter>
- <filter comment="Bug 564563 - Mark deprecated API from o.e.pde.ui.launcher for removal" id="338944126">
- <message_arguments>
- <message_argument value="org.eclipse.pde.ui.launcher.EclipseApplicationLaunchConfiguration"/>
- <message_argument value="getProgramArguments(ILaunchConfiguration)"/>
- </message_arguments>
- </filter>
- <filter comment="Bug 564563 - Mark deprecated API from o.e.pde.ui.launcher for removal" id="338944126">
- <message_arguments>
- <message_argument value="org.eclipse.pde.ui.launcher.EclipseApplicationLaunchConfiguration"/>
- <message_argument value="getVMArguments(ILaunchConfiguration)"/>
- </message_arguments>
- </filter>
- <filter comment="Bug 564563 - Mark deprecated API from o.e.pde.ui.launcher for removal" id="338948223">
- <message_arguments>
- <message_argument value="org.eclipse.pde.ui.launcher.EclipseApplicationLaunchConfiguration"/>
- <message_argument value="EclipseApplicationLaunchConfiguration()"/>
- </message_arguments>
- </filter>
- </resource>
<resource path="src/org/eclipse/pde/ui/launcher/EclipseLauncherTabGroup.java" type="org.eclipse.pde.ui.launcher.EclipseLauncherTabGroup">
<filter id="576778288">
<message_arguments>
@@ -117,48 +91,6 @@
</message_arguments>
</filter>
</resource>
- <resource path="src/org/eclipse/pde/ui/launcher/EquinoxLaunchConfiguration.java" type="org.eclipse.pde.ui.launcher.EquinoxLaunchConfiguration">
- <filter comment="Bug 564563 - Mark deprecated API from o.e.pde.ui.launcher for removal" id="336744520">
- <message_arguments>
- <message_argument value="@noextend"/>
- <message_argument value="org.eclipse.pde.ui.launcher.EquinoxLaunchConfiguration"/>
- </message_arguments>
- </filter>
- <filter comment="Bug 564563 - Mark deprecated API from o.e.pde.ui.launcher for removal" id="338944126">
- <message_arguments>
- <message_argument value="org.eclipse.pde.ui.launcher.EquinoxLaunchConfiguration"/>
- <message_argument value="getProgramArguments(ILaunchConfiguration)"/>
- </message_arguments>
- </filter>
- <filter comment="Bug 564563 - Mark deprecated API from o.e.pde.ui.launcher for removal" id="338948223">
- <message_arguments>
- <message_argument value="org.eclipse.pde.ui.launcher.EquinoxLaunchConfiguration"/>
- <message_argument value="EquinoxLaunchConfiguration()"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/pde/ui/launcher/EquinoxPluginsTab.java" type="org.eclipse.pde.ui.launcher.EquinoxPluginsTab">
- <filter comment="Bug 564563 - Mark deprecated API from o.e.pde.ui.launcher for removal" id="338944126">
- <message_arguments>
- <message_argument value="org.eclipse.pde.ui.launcher.EquinoxPluginsTab"/>
- <message_argument value="getDefaultStartLevel()"/>
- </message_arguments>
- </filter>
- <filter comment="Bug 564563 - Mark deprecated API from o.e.pde.ui.launcher for removal" id="338948223">
- <message_arguments>
- <message_argument value="org.eclipse.pde.ui.launcher.EquinoxPluginsTab"/>
- <message_argument value="EquinoxPluginsTab()"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/pde/ui/launcher/EquinoxSettingsTab.java" type="org.eclipse.pde.ui.launcher.EquinoxSettingsTab">
- <filter comment="Bug 564563 - Mark deprecated API from o.e.pde.ui.launcher for removal" id="338948223">
- <message_arguments>
- <message_argument value="org.eclipse.pde.ui.launcher.EquinoxSettingsTab"/>
- <message_argument value="EquinoxSettingsTab()"/>
- </message_arguments>
- </filter>
- </resource>
<resource path="src/org/eclipse/pde/ui/launcher/IPDELauncherConstants.java" type="org.eclipse.pde.ui.launcher.IPDELauncherConstants">
<filter comment="Code was moved to pde.launching, but we can't make breaking API changes" id="571473929">
<message_arguments>
@@ -167,20 +99,6 @@
</message_arguments>
</filter>
</resource>
- <resource path="src/org/eclipse/pde/ui/launcher/JUnitLaunchConfigurationDelegate.java" type="org.eclipse.pde.ui.launcher.JUnitLaunchConfigurationDelegate">
- <filter comment="Bug 564563 - Mark deprecated API from o.e.pde.ui.launcher for removal" id="336744520">
- <message_arguments>
- <message_argument value="@noextend"/>
- <message_argument value="org.eclipse.pde.ui.launcher.JUnitLaunchConfigurationDelegate"/>
- </message_arguments>
- </filter>
- <filter comment="Bug 564563 - Mark deprecated API from o.e.pde.ui.launcher for removal" id="338948223">
- <message_arguments>
- <message_argument value="org.eclipse.pde.ui.launcher.JUnitLaunchConfigurationDelegate"/>
- <message_argument value="JUnitLaunchConfigurationDelegate()"/>
- </message_arguments>
- </filter>
- </resource>
<resource path="src/org/eclipse/pde/ui/launcher/JUnitTabGroup.java" type="org.eclipse.pde.ui.launcher.JUnitTabGroup">
<filter id="576778288">
<message_arguments>
@@ -198,48 +116,6 @@
</message_arguments>
</filter>
</resource>
- <resource path="src/org/eclipse/pde/ui/launcher/OSGiLaunchConfigurationDelegate.java" type="org.eclipse.pde.ui.launcher.OSGiLaunchConfigurationDelegate">
- <filter comment="Bug 564563 - Mark deprecated API from o.e.pde.ui.launcher for removal" id="336744520">
- <message_arguments>
- <message_argument value="@noextend"/>
- <message_argument value="org.eclipse.pde.ui.launcher.OSGiLaunchConfigurationDelegate"/>
- </message_arguments>
- </filter>
- <filter comment="Bug 564563 - Mark deprecated API from o.e.pde.ui.launcher for removal" id="338948223">
- <message_arguments>
- <message_argument value="org.eclipse.pde.ui.launcher.OSGiLaunchConfigurationDelegate"/>
- <message_argument value="OSGiLaunchConfigurationDelegate()"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/pde/ui/launcher/OSGiLaunchConfigurationInitializer.java" type="org.eclipse.pde.ui.launcher.OSGiLaunchConfigurationInitializer">
- <filter comment="Bug 564563 - Mark deprecated API from o.e.pde.ui.launcher for removal" id="336744520">
- <message_arguments>
- <message_argument value="@noextend"/>
- <message_argument value="org.eclipse.pde.ui.launcher.OSGiLaunchConfigurationInitializer"/>
- </message_arguments>
- </filter>
- <filter comment="Bug 564563 - Mark deprecated API from o.e.pde.ui.launcher for removal" id="338948223">
- <message_arguments>
- <message_argument value="org.eclipse.pde.ui.launcher.OSGiLaunchConfigurationInitializer"/>
- <message_argument value="OSGiLaunchConfigurationInitializer()"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/pde/ui/launcher/PDESourcePathProvider.java" type="org.eclipse.pde.ui.launcher.PDESourcePathProvider">
- <filter comment="Bug 564563 - Mark deprecated API from o.e.pde.ui.launcher for removal" id="336744520">
- <message_arguments>
- <message_argument value="@noextend"/>
- <message_argument value="org.eclipse.pde.ui.launcher.PDESourcePathProvider"/>
- </message_arguments>
- </filter>
- <filter comment="Bug 564563 - Mark deprecated API from o.e.pde.ui.launcher for removal" id="338948223">
- <message_arguments>
- <message_argument value="org.eclipse.pde.ui.launcher.PDESourcePathProvider"/>
- <message_argument value="PDESourcePathProvider()"/>
- </message_arguments>
- </filter>
- </resource>
<resource path="src/org/eclipse/pde/ui/templates/NewPluginProjectFromTemplateWizard.java" type="org.eclipse.pde.ui.templates.NewPluginProjectFromTemplateWizard">
<filter id="576720909">
<message_arguments>
diff --git a/ui/org.eclipse.pde.ui/META-INF/MANIFEST.MF b/ui/org.eclipse.pde.ui/META-INF/MANIFEST.MF
index 5558ff8..53ba882 100644
--- a/ui/org.eclipse.pde.ui/META-INF/MANIFEST.MF
+++ b/ui/org.eclipse.pde.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %name
Bundle-SymbolicName: org.eclipse.pde.ui; singleton:=true
-Bundle-Version: 3.12.100.qualifier
+Bundle-Version: 3.13.0.qualifier
Bundle-Activator: org.eclipse.pde.internal.ui.PDEPlugin
Bundle-Vendor: %provider-name
Bundle-Localization: plugin
diff --git a/ui/org.eclipse.pde.ui/plugin.xml b/ui/org.eclipse.pde.ui/plugin.xml
index caba520..0f4a4a2 100644
--- a/ui/org.eclipse.pde.ui/plugin.xml
+++ b/ui/org.eclipse.pde.ui/plugin.xml
@@ -2137,7 +2137,7 @@
<extension
point="org.eclipse.core.runtime.adapters">
<factory
- adaptableType="org.eclipse.pde.core.target.ITargetLocation"
+ adaptableType="org.eclipse.pde.internal.core.target.IUBundleContainer"
class="org.eclipse.pde.internal.ui.shared.target.IUFactory">
<adapter
type="org.eclipse.jface.viewers.ILabelProvider">
@@ -2146,10 +2146,59 @@
type="org.eclipse.jface.viewers.ITreeContentProvider">
</adapter>
<adapter
- type="org.eclipse.pde.ui.target.ITargetLocationEditor">
+ type="org.eclipse.pde.ui.target.ITargetLocationHandler">
+ </adapter>
+ </factory>
+ <factory
+ adaptableType="org.eclipse.pde.internal.ui.shared.target.IUContentProvider$IUWrapper"
+ class="org.eclipse.pde.internal.ui.shared.target.IUFactory">
+ <adapter
+ type="org.eclipse.jface.viewers.ILabelProvider">
</adapter>
<adapter
- type="org.eclipse.pde.ui.target.ITargetLocationUpdater">
+ type="org.eclipse.pde.ui.target.ITargetLocationHandler">
+ </adapter>
+ </factory>
+ <factory
+ adaptableType="org.eclipse.pde.internal.core.target.DirectoryBundleContainer"
+ class="org.eclipse.pde.internal.ui.shared.target.BundleContainerFactory">
+ <adapter
+ type="org.eclipse.pde.ui.target.ITargetLocationHandler">
+ </adapter>
+ </factory>
+ <factory
+ adaptableType="org.eclipse.pde.internal.core.target.ProfileBundleContainer"
+ class="org.eclipse.pde.internal.ui.shared.target.BundleContainerFactory">
+ <adapter
+ type="org.eclipse.pde.ui.target.ITargetLocationHandler">
+ </adapter>
+ </factory>
+ <factory
+ adaptableType="org.eclipse.pde.internal.core.target.FeatureBundleContainer"
+ class="org.eclipse.pde.internal.ui.shared.target.BundleContainerFactory">
+ <adapter
+ type="org.eclipse.pde.ui.target.ITargetLocationHandler">
+ </adapter>
+ </factory>
+ <factory
+ adaptableType="org.eclipse.pde.core.target.ITargetLocation"
+ class="org.eclipse.pde.internal.ui.shared.target.LegacyAdapterFactory">
+ <adapter
+ type="org.eclipse.pde.ui.target.ITargetLocationHandler">
+ </adapter>
+ </factory>
+ <factory
+ adaptableType="org.eclipse.pde.core.target.TargetBundle"
+ class="org.eclipse.pde.internal.ui.shared.target.TargetBundleAdapter">
+ <adapter
+ type="org.eclipse.pde.ui.target.ITargetLocationHandler">
+ </adapter>
+ </factory>
+ <factory
+ adaptableType="org.eclipse.pde.core.target.TargetFeature"
+ class="org.eclipse.pde.internal.ui.shared.target.TargetFeatureAdapter">
+ <adapter
+ type="org.eclipse.pde.ui.target.ITargetLocationHandler">
</adapter>
</factory>
</extension>
diff --git a/ui/org.eclipse.pde.ui/pom.xml b/ui/org.eclipse.pde.ui/pom.xml
index ec48cf5..0499c00 100644
--- a/ui/org.eclipse.pde.ui/pom.xml
+++ b/ui/org.eclipse.pde.ui/pom.xml
@@ -19,6 +19,6 @@
</parent>
<groupId>org.eclipse.pde</groupId>
<artifactId>org.eclipse.pde.ui</artifactId>
- <version>3.12.100-SNAPSHOT</version>
+ <version>3.13.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/compare/ManifestContentMergeViewer.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/compare/ManifestContentMergeViewer.java
index 0cc98f5..db27dee 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/compare/ManifestContentMergeViewer.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/compare/ManifestContentMergeViewer.java
@@ -13,6 +13,7 @@
*******************************************************************************/
package org.eclipse.pde.internal.ui.compare;
+import java.util.*;
import org.eclipse.compare.CompareConfiguration;
import org.eclipse.compare.contentmergeviewer.TextMergeViewer;
import org.eclipse.jface.resource.JFaceResources;
@@ -30,20 +31,28 @@
public class ManifestContentMergeViewer extends TextMergeViewer {
private IColorManager fColorManager;
+ private Set<ManifestConfiguration> manifestConfigurations;
public ManifestContentMergeViewer(Composite parent, CompareConfiguration configuration) {
super(parent, SWT.LEFT_TO_RIGHT, configuration);
+ manifestConfigurations = Collections.newSetFromMap(new IdentityHashMap<>());
}
@Override
protected void configureTextViewer(TextViewer textViewer) {
if (textViewer instanceof SourceViewer) {
- if (fColorManager == null)
+ if (fColorManager == null) {
fColorManager = ColorManager.getDefault();
- ((SourceViewer) textViewer).configure(new ManifestConfiguration(fColorManager, null, getDocumentPartitioning()));
+ }
+ ManifestConfiguration manifestConfiguration = new ManifestConfiguration(fColorManager, null,
+ getDocumentPartitioning());
+ manifestConfigurations.add(manifestConfiguration);
+ ((SourceViewer) textViewer).configure(manifestConfiguration);
+
Font font = JFaceResources.getFont(ManifestContentMergeViewer.class.getName());
- if (font != null)
+ if (font != null) {
((SourceViewer) textViewer).getTextWidget().setFont(font);
+ }
}
}
@@ -64,9 +73,12 @@
@Override
protected void handleDispose(DisposeEvent event) {
- super.handleDispose(event);
- if (fColorManager != null)
+ if (fColorManager != null) {
fColorManager.dispose();
+ }
+ manifestConfigurations.forEach(c -> c.dispose());
+ manifestConfigurations.clear();
+ super.handleDispose(event);
}
}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/category/SiteBundleAdapter.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/category/SiteBundleAdapter.java
index 96c4085..079f83e 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/category/SiteBundleAdapter.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/category/SiteBundleAdapter.java
@@ -38,10 +38,8 @@
}
/*
- * For retaining selectiong in the tree, when modyfing or moving features,
+ * For retaining selection in the tree, when modifying or moving features,
* SiteFeatureAdapter are equal if features are equal (same ID and version)
- *
- * @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/category/SiteFeatureAdapter.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/category/SiteFeatureAdapter.java
index 788a154..e7dcb4a 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/category/SiteFeatureAdapter.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/category/SiteFeatureAdapter.java
@@ -38,10 +38,8 @@
}
/*
- * For retaining selection in the tree, when modyfing or moving features,
+ * For retaining selection in the tree, when modifying or moving features,
* SiteFeatureAdapter are equal if features are equal
- *
- * @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/site/SiteFeatureAdapter.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/site/SiteFeatureAdapter.java
index 4ade150..bd43f1a 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/site/SiteFeatureAdapter.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/site/SiteFeatureAdapter.java
@@ -36,10 +36,8 @@
}
/*
- * For retaining selectiong in the tree, when modyfing or moving features,
+ * For retaining selection in the tree, when modifying or moving features,
* SiteFeatureAdapter are equal if features are equal (same ID and version)
- *
- * @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/ChangeAwareSourceViewerConfiguration.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/ChangeAwareSourceViewerConfiguration.java
index 441a550..e447be1 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/ChangeAwareSourceViewerConfiguration.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/ChangeAwareSourceViewerConfiguration.java
@@ -184,8 +184,10 @@
public abstract void adaptToPreferenceChange(PropertyChangeEvent event);
public void dispose() {
- if (fQuickAssistant != null)
+ if (fQuickAssistant != null) {
fQuickAssistant.dispose();
+ fQuickAssistant = null;
+ }
}
}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/ManifestConfiguration.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/ManifestConfiguration.java
index dfb9be4..1d6450c 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/ManifestConfiguration.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/ManifestConfiguration.java
@@ -246,9 +246,10 @@
@Override
public void dispose() {
- super.dispose();
- if (fContentAssistant != null)
+ if (fContentAssistantProcessor != null) {
fContentAssistantProcessor.dispose();
+ }
+ super.dispose();
}
@Override
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/PDEQuickAssistAssistant.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/PDEQuickAssistAssistant.java
index 9a5124c..12d843c 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/PDEQuickAssistAssistant.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/PDEQuickAssistAssistant.java
@@ -299,8 +299,23 @@
}
public void dispose() {
- fCreateImage.dispose();
- fRemoveImage.dispose();
- fRenameImage.dispose();
+ if (fCreateImage != null) {
+ fCreateImage.dispose();
+ fCreateImage = null;
+ }
+ if (fRemoveImage != null) {
+ fRemoveImage.dispose();
+ fRemoveImage = null;
+ }
+ if (fRenameImage != null) {
+ fRenameImage.dispose();
+ fRenameImage = null;
+ }
+ }
+
+ @Override
+ public void uninstall() {
+ dispose();
+ super.uninstall();
}
}
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 40375f5..beff0a8 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
@@ -48,7 +48,7 @@
###### Status text #####################################
ExportDestinationTab_InstallIntoCurrentPlatform=&Install into host. Repository:
-ExportPackageVisibilitySection_unconditional=visible to downstream plug-ins
+ExportPackageVisibilitySection_unconditional=public API
Errors_CreationError = Wizard Creation Error
Errors_CreationError_NoWizard = Wizard could not be created.
@@ -2195,9 +2195,9 @@
ImportPackageSection_exported=Select Packages to import:
ImportPackageSection_selection=Import Package Selection
ImportPackageSection_propertyAction=Properties
-ExportPackageSection_desc = Enumerate all the packages that this plug-in exposes to clients. All other packages will be hidden from clients at all times.
+ExportPackageSection_desc = Exported packages can be accessed by other OSGi components.
+ExportPackageSection_descFragment = Exported packages can be accessed by other OSGi components.
ExportPackageSection_uses=Calculate Uses
-ExportPackageSection_descFragment = Enumerate all the packages that this fragment exposes to clients. All other packages will be hidden from clients at all times.
ExportPackageSection_add=Add...
ExportPackageSection_remove=Remove
CalculateUsesAction_jobName=Analyzing Uses directive
@@ -2210,8 +2210,8 @@
ExportOptionsTab_antReservedMessage=build.xml is a file name reserved for PDE
ExportOptionsTab_allowBinaryCycles=A&llow for binary cycles in target platform
ExportOptionsTab_use_workspace_classfiles=&Use class files compiled in the workspace
-ExportPackageVisibilitySection_default=When the runtime is in strict mode, the selected package is:
-ExportPackageVisibilitySection_hideAll=hidden from all plug-ins except:
+ExportPackageVisibilitySection_default=The select package is:
+ExportPackageVisibilitySection_hideAll=provisional API, generating warnings, except for:
CrossPlatformExportPage_available=&Available platforms:
CrossPlatformExportPage_title=Cross-platform export
CrossPlatformExportPage_desc=Select the platforms to which you want to deploy your product.
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dependencies/CalculateUsesOperation.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dependencies/CalculateUsesOperation.java
index e6d57ff..8f747e2 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dependencies/CalculateUsesOperation.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dependencies/CalculateUsesOperation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2016 IBM Corporation and others.
+ * Copyright (c) 2007, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -73,7 +73,7 @@
protected Map<String, HashSet<String>> findPackageReferences(Collection<String> packages, IProgressMonitor monitor) {
IJavaProject jp = JavaCore.create(fProject);
HashMap<String, HashSet<String>> pkgsAndUses = new HashMap<>();
- IPackageFragment[] frags = PDEJavaHelper.getPackageFragments(jp, Collections.EMPTY_SET, false);
+ IPackageFragment[] frags = PDEJavaHelper.getPackageFragments(jp, Collections.emptySet(), false);
SubMonitor subMonitor = SubMonitor.convert(monitor, frags.length * 2);
for (IPackageFragment fragment : frags) {
SubMonitor iterationMonitor = subMonitor.split(2);
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/BundleContainerFactory.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/BundleContainerFactory.java
new file mode 100644
index 0000000..73d19af
--- /dev/null
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/BundleContainerFactory.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Christoph Läubrich and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Christoph Läubrich - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.shared.target;
+
+import org.eclipse.core.runtime.*;
+import org.eclipse.jface.viewers.TreePath;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.pde.core.target.ITargetDefinition;
+import org.eclipse.pde.core.target.ITargetLocation;
+import org.eclipse.pde.internal.core.target.*;
+import org.eclipse.pde.ui.target.ITargetLocationHandler;
+
+public class BundleContainerFactory implements IAdapterFactory, ITargetLocationHandler {
+
+ @Override
+ public <T> T getAdapter(Object adaptableObject, Class<T> adapterType) {
+ if (adaptableObject instanceof AbstractBundleContainer) {
+ AbstractBundleContainer bundleContainer = (AbstractBundleContainer) adaptableObject;
+ if (isValidTargetLocation(bundleContainer)) {
+ if (adapterType == ITargetLocationHandler.class) {
+ return adapterType.cast(this);
+ }
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public Class<?>[] getAdapterList() {
+ return new Class<?>[] { ITargetLocationHandler.class };
+ }
+
+ @Override
+ public boolean canEdit(ITargetDefinition target, TreePath path) {
+ Object root = path.getLastSegment();
+ if (root instanceof ITargetLocation) {
+ ITargetLocation location = (ITargetLocation) root;
+ return isValidTargetLocation(location);
+ }
+ return false;
+ }
+
+ @Override
+ public IWizard getEditWizard(ITargetDefinition target, TreePath path) {
+ Object root = path.getFirstSegment();
+ if (root instanceof ITargetLocation) {
+ ITargetLocation location = (ITargetLocation) root;
+ if (isValidTargetLocation(location)) {
+ return new EditBundleContainerWizard(target, location);
+ }
+ }
+ return null;
+ }
+
+ private static boolean isValidTargetLocation(ITargetLocation targetLocation) {
+ return targetLocation instanceof DirectoryBundleContainer || targetLocation instanceof ProfileBundleContainer
+ || targetLocation instanceof FeatureBundleContainer;
+ }
+
+ @Override
+ public IStatus reload(ITargetDefinition target, ITargetLocation[] targetLocations, IProgressMonitor monitor) {
+ for (ITargetLocation location : targetLocations) {
+ if (location instanceof DirectoryBundleContainer) {
+ ((DirectoryBundleContainer) location).reload();
+ } else if (location instanceof ProfileBundleContainer) {
+ ((ProfileBundleContainer) location).reload();
+ } else if (location instanceof FeatureBundleContainer) {
+ ((FeatureBundleContainer) location).reload();
+ }
+ }
+ return Status.OK_STATUS;
+ }
+
+}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/IUFactory.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/IUFactory.java
index da84b4e..17893a6 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/IUFactory.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/IUFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2015 IBM Corporation and others.
+ * Copyright (c) 2011, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,10 +10,12 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Christoph Läubrich - Bug 568865 - [target] add advanced editing capabilities for custom target platforms
*******************************************************************************/
package org.eclipse.pde.internal.ui.shared.target;
-import java.util.HashSet;
+import java.util.*;
+import java.util.Map.Entry;
import org.eclipse.core.runtime.*;
import org.eclipse.jface.viewers.*;
import org.eclipse.jface.wizard.IWizard;
@@ -21,22 +23,28 @@
import org.eclipse.pde.core.target.ITargetLocation;
import org.eclipse.pde.internal.core.PDECore;
import org.eclipse.pde.internal.core.target.IUBundleContainer;
+import org.eclipse.pde.internal.core.target.P2TargetUtils;
import org.eclipse.pde.internal.ui.shared.target.IUContentProvider.IUWrapper;
-import org.eclipse.pde.ui.target.ITargetLocationEditor;
-import org.eclipse.pde.ui.target.ITargetLocationUpdater;
+import org.eclipse.pde.ui.target.ITargetLocationHandler;
/**
- * Adapter factory for providing all necessary UI components for the {@link IUBundleContainer}
+ * Adapter factory for providing all necessary UI components for the
+ * {@link IUBundleContainer}
*
*/
-public class IUFactory implements IAdapterFactory, ITargetLocationEditor, ITargetLocationUpdater {
+public class IUFactory implements IAdapterFactory, ITargetLocationHandler {
+ private static final Status STATUS_NO_CHANGE = new Status(IStatus.OK, PDECore.PLUGIN_ID, STATUS_CODE_NO_CHANGE, "", //$NON-NLS-1$
+
+ null);
+ private static final Status STATUS_FORCE_RELOAD = new Status(IStatus.OK, PDECore.PLUGIN_ID,
+ ITargetLocationHandler.STATUS_FORCE_RELOAD, "", null); //$NON-NLS-1$ ;
private ILabelProvider fLabelProvider;
private ITreeContentProvider fContentProvider;
@Override
public Class<?>[] getAdapterList() {
- return new Class[] {ILabelProvider.class, ITreeContentProvider.class, ITargetLocationEditor.class, ITargetLocationUpdater.class};
+ return new Class[] { ILabelProvider.class, ITreeContentProvider.class, ITargetLocationHandler.class };
}
@Override
@@ -47,51 +55,115 @@
return (T) getLabelProvider();
} else if (adapterType == ITreeContentProvider.class) {
return (T) getContentProvider();
- } else if (adapterType == ITargetLocationEditor.class) {
- return (T) this;
- } else if (adapterType == ITargetLocationUpdater.class) {
+ } else if (adapterType == ITargetLocationHandler.class) {
return (T) this;
}
} else if (adaptableObject instanceof IUWrapper) {
if (adapterType == ILabelProvider.class) {
return (T) getLabelProvider();
- } else if (adapterType == IContentProvider.class) {
- return (T) getContentProvider();
+ } else if (adapterType == ITargetLocationHandler.class) {
+ return (T) this;
}
}
return null;
}
@Override
- public boolean canEdit(ITargetDefinition target, ITargetLocation targetLocation) {
- return targetLocation instanceof IUBundleContainer;
+ public boolean canEdit(ITargetDefinition target, TreePath path) {
+ Object segment = path.getLastSegment();
+ return segment instanceof IUBundleContainer || segment instanceof IUWrapper;
}
@Override
- public IWizard getEditWizard(ITargetDefinition target, ITargetLocation targetLocation) {
- return new EditBundleContainerWizard(target, targetLocation);
+ public IWizard getEditWizard(ITargetDefinition target, TreePath path) {
+ Object segment = path.getFirstSegment();
+ if (segment instanceof IUBundleContainer) {
+ return new EditBundleContainerWizard(target, (ITargetLocation) segment);
+ }
+ return null;
}
@Override
- public boolean canUpdate(ITargetDefinition target, ITargetLocation targetLocation) {
- return targetLocation instanceof IUBundleContainer;
- }
-
- @Override
- public IStatus update(ITargetDefinition target, ITargetLocation targetLocation, IProgressMonitor monitor) {
- // This method has to run synchronously, so we do the update ourselves instead of using UpdateTargetJob
- if (targetLocation instanceof IUBundleContainer) {
+ public IStatus update(ITargetDefinition target, TreePath[] treePaths, IProgressMonitor monitor) {
+ Set<IUBundleContainer> containers = new HashSet<>();
+ Map<IUBundleContainer, Set<String>> wrappersMap = new HashMap<>();
+ for (TreePath path : treePaths) {
+ Object lastSegment = path.getLastSegment();
+ if (lastSegment instanceof IUBundleContainer) {
+ containers.add((IUBundleContainer) lastSegment);
+ } else if (lastSegment instanceof IUWrapper) {
+ IUWrapper wrapper = (IUWrapper) lastSegment;
+ wrappersMap.computeIfAbsent(wrapper.getParent(), k -> new HashSet<>()).add(wrapper.getIU().getId());
+ }
+ }
+ boolean changed = false;
+ SubMonitor subMonitor = SubMonitor.convert(monitor, (containers.size() + wrappersMap.size()) * 100);
+ for (IUBundleContainer container : containers) {
try {
- boolean result = ((IUBundleContainer) targetLocation).update(new HashSet<>(0), monitor);
- if (result) {
- return Status.OK_STATUS;
- }
- return new Status(IStatus.OK, PDECore.PLUGIN_ID, ITargetLocationUpdater.STATUS_CODE_NO_CHANGE, "", null); //$NON-NLS-1$
+ changed |= container.update(Collections.emptySet(), subMonitor.split(100));
} catch (CoreException e) {
return e.getStatus();
}
}
- return Status.CANCEL_STATUS;
+ for (Entry<IUBundleContainer, Set<String>> entry : wrappersMap.entrySet()) {
+ SubMonitor split = subMonitor.split(100);
+ IUBundleContainer container = entry.getKey();
+ if (containers.contains(container)) {
+ continue;
+ }
+ try {
+ changed |= container.update(entry.getValue(), split);
+ } catch (CoreException e) {
+ return e.getStatus();
+ }
+ }
+ return changed ? Status.OK_STATUS : STATUS_NO_CHANGE;
+ }
+
+ @Override
+ public boolean canRemove(ITargetDefinition target, TreePath treePath) {
+ boolean isValidRoot = treePath.getFirstSegment() instanceof IUBundleContainer;
+ if (treePath.getSegmentCount() == 1) {
+ return isValidRoot;
+ }
+ return isValidRoot && treePath.getLastSegment() instanceof IUWrapper;
+ }
+
+ @Override
+ public boolean canUpdate(ITargetDefinition target, TreePath treePath) {
+ Object lastSegment = treePath.getLastSegment();
+ return lastSegment instanceof IUBundleContainer || lastSegment instanceof IUWrapper;
+ }
+
+ @Override
+ public IStatus remove(ITargetDefinition target, TreePath[] treePaths) {
+ boolean forceReload = false;
+ for (TreePath treePath : treePaths) {
+ Object segment = treePath.getLastSegment();
+ if (segment instanceof IUBundleContainer) {
+ // nothing to do but force reload the target
+ forceReload = true;
+ } else if (segment instanceof IUWrapper) {
+ // TODO check if we need to force-reload here (at least in
+ // planner mode!)
+ IUWrapper wrapper = (IUWrapper) segment;
+ wrapper.getParent().removeInstallableUnit(wrapper.getIU());
+ }
+ }
+ return forceReload ? STATUS_FORCE_RELOAD : Status.OK_STATUS;
+ }
+
+ @Override
+ public IStatus reload(ITargetDefinition target, ITargetLocation[] targetLocations, IProgressMonitor monitor) {
+ // delete profile
+ try {
+ // TODO might want to merge forceCheckTarget into delete Profile?
+ P2TargetUtils.forceCheckTarget(target);
+ P2TargetUtils.deleteProfile(target.getHandle());
+ return Status.OK_STATUS;
+ } catch (CoreException e) {
+ return e.getStatus();
+ }
}
private ILabelProvider getLabelProvider() {
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/LegacyAdapterFactory.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/LegacyAdapterFactory.java
new file mode 100644
index 0000000..68853ef
--- /dev/null
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/LegacyAdapterFactory.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Christoph Läubrich and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Christoph Läubrich - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.shared.target;
+
+import org.eclipse.core.runtime.*;
+import org.eclipse.jface.viewers.TreePath;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.pde.core.target.ITargetDefinition;
+import org.eclipse.pde.core.target.ITargetLocation;
+import org.eclipse.pde.ui.target.*;
+
+@SuppressWarnings("deprecation")
+public class LegacyAdapterFactory implements IAdapterFactory {
+
+ @Override
+ public <T> T getAdapter(Object adaptableObject, Class<T> adapterType) {
+ if (adaptableObject instanceof ITargetLocation) {
+ ITargetLocation location = (ITargetLocation) adaptableObject;
+ if (adapterType == ITargetLocationHandler.class) {
+ LegacyProxy proxy = new LegacyProxy(location);
+ if (proxy.editor != null || proxy.updater != null) {
+ return adapterType.cast(proxy);
+ }
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public Class<?>[] getAdapterList() {
+ return new Class<?>[] { ITargetLocationHandler.class };
+ }
+
+ private static class LegacyProxy implements ITargetLocationHandler {
+
+ private final ITargetLocation location;
+ private final ITargetLocationEditor editor;
+ private final ITargetLocationUpdater updater;
+
+ public LegacyProxy(ITargetLocation location) {
+ this.location = location;
+ editor = Adapters.adapt(location, ITargetLocationEditor.class);
+ updater = Adapters.adapt(location, ITargetLocationUpdater.class);
+ }
+
+ @Override
+ public boolean canEdit(ITargetDefinition target, TreePath treePath) {
+ return editor != null && editor.canEdit(target, location);
+ }
+
+ @Override
+ public IWizard getEditWizard(ITargetDefinition target, TreePath treePath) {
+ if (editor != null) {
+ return editor.getEditWizard(target, location);
+ }
+ return null;
+ }
+
+ @Override
+ public boolean canUpdate(ITargetDefinition target, TreePath treePath) {
+ return updater != null && updater.canUpdate(target, location);
+ }
+
+ @Override
+ public IStatus update(ITargetDefinition target, TreePath[] treePath, IProgressMonitor monitor) {
+ if (updater != null) {
+ return updater.update(target, location, monitor);
+ }
+ return Status.CANCEL_STATUS;
+ }
+
+ }
+}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/Messages.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/Messages.java
index 30cb23a..7d79583 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/Messages.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/Messages.java
@@ -57,16 +57,19 @@
public static String ArgumentsFromContainerSelectionDialog_3;
public static String ArgumentsFromContainerSelectionDialog_4;
public static String ArgumentsFromContainerSelectionDialog_5;
- public static String BundleContainerTable_0;
- public static String BundleContainerTable_1;
- public static String BundleContainerTable_10;
- public static String BundleContainerTable_14;
- public static String BundleContainerTable_15;
- public static String BundleContainerTable_2;
- public static String BundleContainerTable_3;
- public static String BundleContainerTable_4;
+ public static String BundleContainerTable_Btn_Text_Add;
+ public static String BundleContainerTable_Btn_Text_Edit;
+ public static String BundleContainerTable_Btn_Text_Remove;
+ public static String BundleContainerTable_Btn_Text_Update;
+ public static String BundleContainerTable_Btn_Text_Reload;
public static String BundleContainerTable_8;
public static String BundleContainerTable_9;
+ public static String BundleContainerTable_10;
+ public static String BundleContainerTable_Btn_Text_Enable;
+ public static String BundleContainerTable_Btn_Text_Disable;
+ public static String BundleContainerTable_Btn_Text_Toggle;
+ public static String BundleContainerTable_14;
+ public static String BundleContainerTable_15;
public static String EditBundleContainerWizard_0;
public static String EditDirectoryContainerPage_0;
public static String EditDirectoryContainerPage_1;
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetBundleAdapter.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetBundleAdapter.java
new file mode 100644
index 0000000..05a0bf2
--- /dev/null
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetBundleAdapter.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Christoph Läubrich and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Christoph Läubrich - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.shared.target;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
+import org.eclipse.pde.core.target.*;
+import org.eclipse.pde.internal.core.target.TargetDefinition;
+import org.eclipse.pde.ui.target.ITargetLocationHandler;
+
+public class TargetBundleAdapter implements IAdapterFactory {
+
+ private ToggleIncludeHandler<TargetBundle> handler = new ToggleIncludeHandler<>(TargetBundle.class,
+ TargetDefinition.MODE_PLUGIN, ITargetDefinition::getAllBundles,
+ TargetBundleAdapter::asNameVersionDescriptor);
+
+ @Override
+ public <T> T getAdapter(Object adaptableObject, Class<T> adapterType) {
+ if (adaptableObject instanceof TargetBundle) {
+ if (adapterType == ITargetLocationHandler.class) {
+ return adapterType.cast(handler);
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public Class<?>[] getAdapterList() {
+ return new Class<?>[] { ITargetLocationHandler.class };
+ }
+
+ private static NameVersionDescriptor asNameVersionDescriptor(TargetBundle bundle) {
+ BundleInfo info = bundle.getBundleInfo();
+ if (info == null) {
+ return null;
+ }
+ return new NameVersionDescriptor(info.getSymbolicName(), info.getVersion(), NameVersionDescriptor.TYPE_PLUGIN);
+ }
+
+}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetFeatureAdapter.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetFeatureAdapter.java
new file mode 100644
index 0000000..7354f0f
--- /dev/null
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetFeatureAdapter.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Christoph Läubrich and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Christoph Läubrich - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.shared.target;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.pde.core.target.*;
+import org.eclipse.pde.internal.core.target.TargetDefinition;
+import org.eclipse.pde.ui.target.ITargetLocationHandler;
+
+public class TargetFeatureAdapter implements IAdapterFactory {
+
+ private ToggleIncludeHandler<TargetFeature> handler = new ToggleIncludeHandler<>(TargetFeature.class,
+ TargetDefinition.MODE_FEATURE,
+ ITargetDefinition::getAllFeatures, TargetFeatureAdapter::asNameVersionDescriptor);
+
+ @Override
+ public <T> T getAdapter(Object adaptableObject, Class<T> adapterType) {
+ if (adaptableObject instanceof TargetFeature) {
+ if (adapterType == ITargetLocationHandler.class) {
+ return adapterType.cast(handler);
+ }
+ }
+
+ return null;
+ }
+
+ @Override
+ public Class<?>[] getAdapterList() {
+ return new Class<?>[] { ITargetLocationHandler.class };
+ }
+
+ private static NameVersionDescriptor asNameVersionDescriptor(TargetFeature info) {
+ return new NameVersionDescriptor(info.getId(), info.getVersion(), NameVersionDescriptor.TYPE_PLUGIN);
+ }
+
+}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetLocationHandlerAdapter.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetLocationHandlerAdapter.java
new file mode 100644
index 0000000..56bcf27
--- /dev/null
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetLocationHandlerAdapter.java
@@ -0,0 +1,212 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Christoph Läubrich and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Christoph Läubrich - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.shared.target;
+
+import java.util.*;
+import java.util.Map.Entry;
+import java.util.function.Consumer;
+import org.eclipse.core.runtime.*;
+import org.eclipse.jface.viewers.TreePath;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.pde.core.target.ITargetDefinition;
+import org.eclipse.pde.core.target.ITargetLocation;
+import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.ui.target.ITargetLocationHandler;
+
+/**
+ * Single Entry Point handler for the UI that delegates to adapter framework
+ * when necessary
+ *
+ */
+class TargetLocationHandlerAdapter implements ITargetLocationHandler {
+
+ @Override
+ public boolean canEdit(ITargetDefinition target, TreePath treePath) {
+ Object segment = treePath.getLastSegment();
+ ITargetLocationHandler handler = Adapters.adapt(segment, ITargetLocationHandler.class);
+ if (handler != null) {
+ return handler.canEdit(target, treePath);
+ }
+ return false;
+ }
+
+ @Override
+ public boolean canUpdate(ITargetDefinition target, TreePath treePath) {
+ Object segment = treePath.getLastSegment();
+ ITargetLocationHandler handler = Adapters.adapt(segment, ITargetLocationHandler.class);
+ if (handler != null) {
+ return handler.canUpdate(target, treePath);
+ }
+ return false;
+ }
+
+ @Override
+ public boolean canDisable(ITargetDefinition target, TreePath treePath) {
+ Object segment = treePath.getLastSegment();
+ ITargetLocationHandler handler = Adapters.adapt(segment, ITargetLocationHandler.class);
+ if (handler != null) {
+ return handler.canDisable(target, treePath);
+ }
+ return false;
+ }
+
+ @Override
+ public boolean canEnable(ITargetDefinition target, TreePath treePath) {
+ Object segment = treePath.getLastSegment();
+ ITargetLocationHandler handler = Adapters.adapt(segment, ITargetLocationHandler.class);
+ if (handler != null) {
+ return handler.canEnable(target, treePath);
+ }
+ return false;
+ }
+
+ @Override
+ public boolean canRemove(ITargetDefinition target, TreePath treePath) {
+ Object segment = treePath.getLastSegment();
+ if (segment instanceof ITargetLocation) {
+ return true;
+ }
+ ITargetLocationHandler handler = Adapters.adapt(segment, ITargetLocationHandler.class);
+ if (handler != null) {
+ return handler.canRemove(target, treePath);
+ }
+ return false;
+ }
+
+ @Override
+ public IStatus update(ITargetDefinition target, TreePath[] treePath, IProgressMonitor monitor) {
+ Map<ITargetLocationHandler, List<TreePath>> handlerMap = computeHandlerMap(target, treePath,
+ ITargetLocationHandler::canUpdate, null);
+ MultiStatus status = new MultiStatus(PDECore.PLUGIN_ID, 0, "update"); //$NON-NLS-1$
+ SubMonitor subMonitor = SubMonitor.convert(monitor, 100 * handlerMap.size());
+ for (Entry<ITargetLocationHandler, List<TreePath>> entry : handlerMap.entrySet()) {
+ status.add(entry.getKey().update(target, entry.getValue().toArray(TreePath[]::new), subMonitor.split(100)));
+ }
+ return status;
+ }
+
+ @Override
+ public IStatus reload(ITargetDefinition target, ITargetLocation[] targetLocations, IProgressMonitor monitor) {
+ Map<ITargetLocationHandler, List<ITargetLocation>> handlerMap = new HashMap<>();
+ MultiStatus status = new MultiStatus(PDECore.PLUGIN_ID, 0, "reload target"); //$NON-NLS-1$
+ if (targetLocations != null && targetLocations.length > 0) {
+ for (ITargetLocation targetLocation : targetLocations) {
+ ITargetLocationHandler handler = Adapters.adapt(targetLocation, ITargetLocationHandler.class);
+ if (handler != null) {
+ handlerMap.computeIfAbsent(handler, h -> new ArrayList<>()).add(targetLocation);
+ }
+ }
+ }
+ SubMonitor subMonitor = SubMonitor.convert(monitor, handlerMap.size() * 100);
+ for (Entry<ITargetLocationHandler, List<ITargetLocation>> entry : handlerMap.entrySet()) {
+ status.add(entry.getKey().reload(target, entry.getValue().toArray(ITargetLocation[]::new),
+ subMonitor.split(100)));
+ }
+ return status;
+ }
+
+ @Override
+ public IStatus remove(ITargetDefinition target, TreePath[] treePath) {
+ List<ITargetLocation> removedLocations = new ArrayList<>();
+ Map<ITargetLocationHandler, List<TreePath>> handlerMap = computeHandlerMap(target, treePath,
+ ITargetLocationHandler::canRemove, path -> {
+ Object currentSelection = path.getLastSegment();
+ if (currentSelection instanceof ITargetLocation) {
+ // record all locations that are about to removed
+ removedLocations.add((ITargetLocation) currentSelection);
+ }
+ });
+ boolean forceReload = false;
+ MultiStatus status = new MultiStatus(PDECore.PLUGIN_ID, 0, "remove"); //$NON-NLS-1$
+ for (Entry<ITargetLocationHandler, List<TreePath>> entry : handlerMap.entrySet()) {
+ IStatus remove = entry.getKey().remove(target, entry.getValue().toArray(TreePath[]::new));
+ forceReload |= remove.isOK() && remove.getCode() == ITargetLocationHandler.STATUS_FORCE_RELOAD;
+ status.add(remove);
+ }
+ if (removedLocations.size() > 0) {
+ ITargetLocation[] containers = target.getTargetLocations();
+ if (containers != null && containers.length > 0) {
+ List<ITargetLocation> updatedLocations = new ArrayList<>();
+ for (ITargetLocation location : containers) {
+ if (removedLocations.contains(location)) {
+ continue;
+ }
+ updatedLocations.add(location);
+ }
+ if (updatedLocations.isEmpty()) {
+ target.setTargetLocations(null);
+ } else {
+ target.setTargetLocations(updatedLocations.toArray(ITargetLocation[]::new));
+ }
+ }
+ }
+ return statusWithCode(status, ITargetLocationHandler.STATUS_FORCE_RELOAD, forceReload);
+ }
+
+ @Override
+ public IStatus toggle(ITargetDefinition target, TreePath[] treePath) {
+ boolean forceReload = false;
+ MultiStatus status = new MultiStatus(PDECore.PLUGIN_ID, 0, "disable"); //$NON-NLS-1$
+ Map<ITargetLocationHandler, List<TreePath>> handlerMap = computeHandlerMap(target, treePath,
+ (h, t, p) -> h.canEnable(t, p) || h.canDisable(t, p), null);
+ for (Entry<ITargetLocationHandler, List<TreePath>> entry : handlerMap.entrySet()) {
+ TreePath[] handlerTreePaths = entry.getValue().toArray(TreePath[]::new);
+ ITargetLocationHandler handler = entry.getKey();
+ IStatus enable = handler.toggle(target, handlerTreePaths);
+ forceReload |= enable.isOK() && enable.getCode() == ITargetLocationHandler.STATUS_FORCE_RELOAD;
+ status.add(enable);
+ }
+ return statusWithCode(status, ITargetLocationHandler.STATUS_FORCE_RELOAD, forceReload);
+ }
+
+ @Override
+ public IWizard getEditWizard(ITargetDefinition target, TreePath treePath) {
+ Object segment = treePath.getLastSegment();
+
+ ITargetLocationHandler handler = Adapters.adapt(segment, ITargetLocationHandler.class);
+ if (handler != null) {
+ return handler.getEditWizard(target, treePath);
+ }
+ return null;
+ }
+
+ private static IStatus statusWithCode(MultiStatus status, int code, boolean useCode) {
+ if (status.isOK() && useCode) {
+ return new MultiStatus(PDECore.PLUGIN_ID, code, status.getChildren(),
+ status.getMessage(), null);
+ }
+ return status;
+ }
+
+ private static Map<ITargetLocationHandler, List<TreePath>> computeHandlerMap(ITargetDefinition target,
+ TreePath[] treePath, TriFunction<ITargetLocationHandler, ITargetDefinition, TreePath, Boolean> filter,
+ Consumer<TreePath> interceptor) {
+ Map<ITargetLocationHandler, List<TreePath>> handlerMap = new HashMap<>();
+ for (TreePath path : treePath) {
+ Object currentSelection = path.getLastSegment();
+ ITargetLocationHandler handler = Adapters.adapt(currentSelection, ITargetLocationHandler.class);
+ if (handler != null && filter.test(handler, target, path)) {
+ handlerMap.computeIfAbsent(handler, h -> new ArrayList<>()).add(path);
+ }
+ if (interceptor != null) {
+ interceptor.accept(path);
+ }
+ }
+ return handlerMap;
+ }
+
+ static interface TriFunction<A, B, C, R> {
+ R test(A a, B b, C c);
+ }
+}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetLocationsGroup.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetLocationsGroup.java
index 9a38028..c0b75d3 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetLocationsGroup.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetLocationsGroup.java
@@ -10,14 +10,16 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
- * Christoph Läubrich - Bug 567506
+ * Christoph Läubrich [Bug 567506] - TargetLocationsGroup.handleEdit() should activate bundles if necessary
+ * [Bug 568865] - add advanced editing capabilities for custom target platforms
*******************************************************************************/
package org.eclipse.pde.internal.ui.shared.target;
import static org.eclipse.swt.events.SelectionListener.widgetSelectedAdapter;
-import java.util.*;
+import java.util.Collections;
import java.util.List;
+import java.util.Objects;
import org.eclipse.core.runtime.*;
import org.eclipse.core.runtime.jobs.*;
import org.eclipse.jface.action.Action;
@@ -29,15 +31,12 @@
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.pde.core.target.*;
import org.eclipse.pde.internal.core.PDECore;
-import org.eclipse.pde.internal.core.target.*;
import org.eclipse.pde.internal.ui.PDEPlugin;
import org.eclipse.pde.internal.ui.SWTFactory;
import org.eclipse.pde.internal.ui.editor.FormLayoutFactory;
import org.eclipse.pde.internal.ui.editor.targetdefinition.TargetEditor;
-import org.eclipse.pde.internal.ui.shared.target.IUContentProvider.IUWrapper;
import org.eclipse.pde.internal.ui.wizards.target.TargetDefinitionContentPage;
-import org.eclipse.pde.ui.target.ITargetLocationEditor;
-import org.eclipse.pde.ui.target.ITargetLocationUpdater;
+import org.eclipse.pde.ui.target.ITargetLocationHandler;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
@@ -48,9 +47,9 @@
import org.eclipse.ui.progress.UIJob;
/**
- * UI part that can be added to a dialog or to a form editor. Contains a table displaying
- * the bundle containers of a target definition. Also has buttons to add, edit and remove
- * bundle containers of varying types.
+ * UI part that can be added to a dialog or to a form editor. Contains a table
+ * displaying the bundle containers of a target definition. Also has buttons to
+ * add, edit and remove bundle containers of varying types.
*
* @see TargetEditor
* @see TargetDefinitionContentPage
@@ -59,6 +58,31 @@
*/
public class TargetLocationsGroup {
+ private static final String BUTTON_STATE = "ButtonState"; //$NON-NLS-1$
+
+ private enum DeleteButtonState {
+ NONE, REMOVE, ENABLE, DISABLE, TOGGLE;
+
+ static DeleteButtonState computeState(boolean canRemove, boolean canEnable, boolean canDisable) {
+ if (canRemove) {
+ if (canEnable || canDisable) {
+ // a mixture of actions is currently selected
+ return NONE;
+ }
+ return REMOVE;
+ }
+ if (canEnable) {
+ if (canDisable) {
+ return TOGGLE;
+ }
+ return ENABLE;
+ } else if (canDisable) {
+ return DISABLE;
+ }
+ return NONE;
+ }
+ }
+
private TreeViewer fTreeViewer;
private Action fCopySelectionAction;
private Button fAddButton;
@@ -71,12 +95,16 @@
private ITargetDefinition fTarget;
private ListenerList<ITargetChangedListener> fChangeListeners = new ListenerList<>();
private ListenerList<ITargetChangedListener> fReloadListeners = new ListenerList<>();
+ private static final TargetLocationHandlerAdapter ADAPTER = new TargetLocationHandlerAdapter();
/**
- * Creates this part using the form toolkit and adds it to the given composite.
+ * Creates this part using the form toolkit and adds it to the given
+ * composite.
*
- * @param parent parent composite
- * @param toolkit toolkit to create the widgets with
+ * @param parent
+ * parent composite
+ * @param toolkit
+ * toolkit to create the widgets with
* @return generated instance of the table part
*/
public static TargetLocationsGroup createInForm(Composite parent, FormToolkit toolkit) {
@@ -86,9 +114,11 @@
}
/**
- * Creates this part using standard dialog widgets and adds it to the given composite.
+ * Creates this part using standard dialog widgets and adds it to the given
+ * composite.
*
- * @param parent parent composite
+ * @param parent
+ * parent composite
* @return generated instance of the table part
*/
public static TargetLocationsGroup createInDialog(Composite parent) {
@@ -106,10 +136,12 @@
}
/**
- * Adds a listener to the set of listeners that will be notified when the bundle containers
- * are modified. This method has no effect if the listener has already been added.
+ * Adds a listener to the set of listeners that will be notified when the
+ * bundle containers are modified. This method has no effect if the listener
+ * has already been added.
*
- * @param listener target changed listener to add
+ * @param listener
+ * target changed listener to add
*/
public void addTargetChangedListener(ITargetChangedListener listener) {
fChangeListeners.add(listener);
@@ -117,9 +149,11 @@
/**
* Adds a listener to the set of listeners that will be notified when target
- * is reloaded. This method has no effect if the listener has already been added.
+ * is reloaded. This method has no effect if the listener has already been
+ * added.
*
- * @param listener target changed listener to add
+ * @param listener
+ * target changed listener to add
*/
public void addTargetReloadListener(ITargetChangedListener listener) {
fReloadListeners.add(listener);
@@ -127,8 +161,11 @@
/**
* Creates the part contents from a toolkit
- * @param parent parent composite
- * @param toolkit form toolkit to create widgets
+ *
+ * @param parent
+ * parent composite
+ * @param toolkit
+ * form toolkit to create widgets
*/
private void createFormContents(Composite parent, FormToolkit toolkit) {
Composite comp = toolkit.createComposite(parent);
@@ -147,12 +184,12 @@
buttonComp.setLayout(layout);
buttonComp.setLayoutData(new GridData(GridData.FILL_VERTICAL));
- fAddButton = toolkit.createButton(buttonComp, Messages.BundleContainerTable_0, SWT.PUSH);
- fEditButton = toolkit.createButton(buttonComp, Messages.BundleContainerTable_1, SWT.PUSH);
- fRemoveButton = toolkit.createButton(buttonComp, Messages.BundleContainerTable_2, SWT.PUSH);
- fUpdateButton = toolkit.createButton(buttonComp, Messages.BundleContainerTable_3, SWT.PUSH);
+ fAddButton = toolkit.createButton(buttonComp, Messages.BundleContainerTable_Btn_Text_Add, SWT.PUSH);
+ fEditButton = toolkit.createButton(buttonComp, Messages.BundleContainerTable_Btn_Text_Edit, SWT.PUSH);
+ fRemoveButton = toolkit.createButton(buttonComp, Messages.BundleContainerTable_Btn_Text_Remove, SWT.PUSH);
+ fUpdateButton = toolkit.createButton(buttonComp, Messages.BundleContainerTable_Btn_Text_Update, SWT.PUSH);
fUpdateButton.setToolTipText(Messages.TargetLocationsGroup_update);
- fReloadButton = toolkit.createButton(buttonComp, Messages.BundleContainerTable_4, SWT.PUSH);
+ fReloadButton = toolkit.createButton(buttonComp, Messages.BundleContainerTable_Btn_Text_Reload, SWT.PUSH);
fReloadButton.setToolTipText(Messages.TargetLocationsGroup_reload);
fShowContentButton = toolkit.createButton(comp, Messages.TargetLocationsGroup_1, SWT.CHECK);
@@ -165,7 +202,9 @@
/**
* Creates the part contents using SWTFactory
- * @param parent parent composite
+ *
+ * @param parent
+ * parent composite
*/
private void createDialogContents(Composite parent) {
Composite comp = SWTFactory.createComposite(parent, 2, 1, GridData.FILL_BOTH, 0, 0);
@@ -185,11 +224,11 @@
buttonComp.setLayout(layout);
buttonComp.setLayoutData(new GridData(GridData.FILL_VERTICAL));
- fAddButton = SWTFactory.createPushButton(buttonComp, Messages.BundleContainerTable_0, null);
- fEditButton = SWTFactory.createPushButton(buttonComp, Messages.BundleContainerTable_1, null);
- fRemoveButton = SWTFactory.createPushButton(buttonComp, Messages.BundleContainerTable_2, null);
- fUpdateButton = SWTFactory.createPushButton(buttonComp, Messages.BundleContainerTable_3, null);
- fReloadButton = SWTFactory.createPushButton(buttonComp, Messages.BundleContainerTable_4, null);
+ fAddButton = SWTFactory.createPushButton(buttonComp, Messages.BundleContainerTable_Btn_Text_Add, null);
+ fEditButton = SWTFactory.createPushButton(buttonComp, Messages.BundleContainerTable_Btn_Text_Edit, null);
+ fRemoveButton = SWTFactory.createPushButton(buttonComp, Messages.BundleContainerTable_Btn_Text_Remove, null);
+ fUpdateButton = SWTFactory.createPushButton(buttonComp, Messages.BundleContainerTable_Btn_Text_Update, null);
+ fReloadButton = SWTFactory.createPushButton(buttonComp, Messages.BundleContainerTable_Btn_Text_Reload, null);
fShowContentButton = SWTFactory.createCheckButton(comp, Messages.TargetLocationsGroup_1, null, false, 2);
@@ -252,7 +291,8 @@
}
/**
- * Sets up the buttons, the button fields must already be created before calling this method
+ * Sets up the buttons, the button fields must already be created before
+ * calling this method
*/
private void initializeButtons() {
fAddButton.addSelectionListener(widgetSelectedAdapter(e -> handleAdd()));
@@ -280,7 +320,8 @@
SWTFactory.setButtonDimensionHint(fReloadButton);
fShowContentButton.addSelectionListener(widgetSelectedAdapter(e -> {
- ((TargetLocationContentProvider) fTreeViewer.getContentProvider()).setShowLocationContent(fShowContentButton.getSelection());
+ ((TargetLocationContentProvider) fTreeViewer.getContentProvider())
+ .setShowLocationContent(fShowContentButton.getSelection());
fTreeViewer.refresh();
fTreeViewer.expandAll();
}));
@@ -289,9 +330,11 @@
}
/**
- * Sets the target definition model to use as input for the tree, can be called with different
- * models to change the tree's input.
- * @param target target model
+ * Sets the target definition model to use as input for the tree, can be
+ * called with different models to change the tree's input.
+ *
+ * @param target
+ * target model
*/
public void setInput(ITargetDefinition target) {
fTarget = target;
@@ -311,141 +354,58 @@
}
private void handleEdit() {
- IStructuredSelection selection = fTreeViewer.getStructuredSelection();
- for (Iterator<?> iterator = selection.iterator(); iterator.hasNext();) {
- Object currentSelection = iterator.next();
- if (currentSelection instanceof ITargetLocation) {
- ITargetLocation location = (ITargetLocation) currentSelection;
- ITargetLocationEditor editor = Adapters.adapt(location, ITargetLocationEditor.class);
- if (editor != null) {
- if (editor.canEdit(fTarget, location)) {
- IWizard editWizard = editor.getEditWizard(fTarget, location);
- if (editWizard != null) {
- Shell parent = fTreeViewer.getTree().getShell();
- WizardDialog wizard = new WizardDialog(parent, editWizard);
- if (wizard.open() == Window.OK) {
- // Update the table
- // TODO Do we need to force a resolve for IUBundleContainers?
- contentsChanged(false);
- fTreeViewer.refresh();
- updateButtons();
- // TODO We can't restore selection if they replace the location
- fTreeViewer.setSelection(new StructuredSelection(location), true);
- }
- }
- break; //Only open for one selected item
- }
- } else if (location instanceof AbstractBundleContainer) {
- // TODO Custom code for locations that don't use adapters yet
- Shell parent = fTreeViewer.getTree().getShell();
- EditBundleContainerWizard wizard = new EditBundleContainerWizard(fTarget, location);
- WizardDialog dialog = new WizardDialog(parent, wizard);
- if (dialog.open() == Window.OK) {
- contentsChanged(false);
- fTreeViewer.refresh();
- updateButtons();
- // TODO We can't restore selection if they replace the location
- fTreeViewer.setSelection(new StructuredSelection(location), true);
- }
- break; //Only open for one selected item
- }
- } else if (currentSelection instanceof IUWrapper) {
- // TODO Custom code to allow editing of individual IUs
- IUWrapper wrapper = (IUWrapper) currentSelection;
+ ITreeSelection selection = fTreeViewer.getStructuredSelection();
+ TreePath[] paths = selection.getPaths();
+ if (paths.length == 1) {
+ IWizard editWizard = ADAPTER.getEditWizard(fTarget, paths[0]);
+ if (editWizard != null) {
Shell parent = fTreeViewer.getTree().getShell();
- EditBundleContainerWizard editWizard = new EditBundleContainerWizard(fTarget, wrapper.getParent());
WizardDialog wizard = new WizardDialog(parent, editWizard);
if (wizard.open() == Window.OK) {
- // Update the table
- // TODO Do we need to force a resolve for IUBundleContainers?
+ updateXML();
contentsChanged(false);
fTreeViewer.refresh();
updateButtons();
- // TODO We can't restore selection if they replace the location
- fTreeViewer.setSelection(new StructuredSelection(wrapper.getParent()), true);
}
- break; //Only open for one selected item
}
}
}
+ private void updateXML() {
+ fTarget.setTargetLocations(fTarget.getTargetLocations());
+ }
+
private void handleRemove() {
- // TODO Contains custom code to remove individual IUWrappers
- // TODO Contains custom code to force re-resolve if IUBundleContainer removed
-
- IStructuredSelection selection = fTreeViewer.getStructuredSelection();
- ITargetLocation[] containers = fTarget.getTargetLocations();
- if (!selection.isEmpty() && containers != null && containers.length > 0) {
- List<Object> toRemove = new ArrayList<>();
- boolean removedSite = false;
- boolean removedContainer = false;
- for (Iterator<?> iterator = selection.iterator(); iterator.hasNext();) {
- Object currentSelection = iterator.next();
- if (currentSelection instanceof ITargetLocation) {
- if (currentSelection instanceof IUBundleContainer) {
- removedSite = true;
- }
- removedContainer = true;
- toRemove.add(currentSelection);
- }
- if (currentSelection instanceof IUWrapper) {
- toRemove.add(currentSelection);
- }
- }
-
- if (removedContainer) {
- Set<ITargetLocation> newContainers = new HashSet<>();
- if (fTarget.getTargetLocations() != null) {
- newContainers.addAll(Arrays.asList(fTarget.getTargetLocations()));
- }
- newContainers.removeAll(toRemove);
- if (!newContainers.isEmpty()) {
- fTarget.setTargetLocations(newContainers.toArray(new ITargetLocation[newContainers.size()]));
- } else {
- fTarget.setTargetLocations(null);
- }
-
- // If we remove a site container, the content change update must force a re-resolve bug 275458 / bug 275401
- // also if the container has errors and has been removed.
- // refresh will refresh the error
- contentsChanged(removedSite || !fTarget.getStatus().isOK());
- fTreeViewer.refresh(false);
- updateButtons();
- } else {
- for (Object object : toRemove) {
- if (object instanceof IUWrapper) {
- ((IUWrapper) object).getParent().removeInstallableUnit(((IUWrapper) object).getIU());
- }
- }
- contentsChanged(removedSite);
- fTreeViewer.refresh(true);
- updateButtons();
- }
+ ITreeSelection selection = fTreeViewer.getStructuredSelection();
+ DeleteButtonState state = (DeleteButtonState) Objects.requireNonNullElse(fRemoveButton.getData(BUTTON_STATE),
+ DeleteButtonState.NONE);
+ if (selection.isEmpty() || state == DeleteButtonState.NONE) {
+ fRemoveButton.setEnabled(false);
+ return;
}
+ IStatus tstatus = fTarget.getStatus();
+ IStatus status;
+ if (state == DeleteButtonState.REMOVE) {
+ status = log(ADAPTER.remove(fTarget, selection.getPaths()));
+ } else {
+ status = log(ADAPTER.toggle(fTarget, selection.getPaths()));
+ }
+ boolean forceReload = (tstatus != null && !tstatus.isOK())
+ || (status != null && status.isOK() && status.getCode() == ITargetLocationHandler.STATUS_FORCE_RELOAD);
+ updateXML();
+ contentsChanged(forceReload);
+ fTreeViewer.refresh();
+ updateButtons();
}
private void handleUpdate() {
- // TODO Only IUWrapper children are added to the map for special update processing
- IStructuredSelection selection = fTreeViewer.getStructuredSelection();
- Map<ITargetLocation, Set<Object>> toUpdate = new HashMap<>();
- for (Iterator<?> iterator = selection.iterator(); iterator.hasNext();) {
- Object currentSelection = iterator.next();
- if (currentSelection instanceof ITargetLocation)
- toUpdate.put((ITargetLocation) currentSelection, new HashSet<>(0));
- else if (currentSelection instanceof IUWrapper) {
- IUWrapper wrapper = (IUWrapper) currentSelection;
- Set<Object> iuSet = toUpdate.get(wrapper.getParent());
- if (iuSet == null) {
- iuSet = new HashSet<>();
- iuSet.add(wrapper.getIU().getId());
- toUpdate.put(wrapper.getParent(), iuSet);
- } else if (!iuSet.isEmpty())
- iuSet.add(wrapper.getIU().getId());
- }
- }
- if (toUpdate.isEmpty())
+ ITreeSelection selection = fTreeViewer.getStructuredSelection();
+ if (selection.isEmpty()) {
+ fUpdateButton.setEnabled(false);
return;
-
+ }
+ List<IJobFunction> updateActions = Collections
+ .singletonList(monitor -> log(ADAPTER.update(fTarget, selection.getPaths(), monitor)));
JobChangeAdapter listener = new JobChangeAdapter() {
@Override
public void done(final IJobChangeEvent event) {
@@ -455,17 +415,21 @@
IStatus result = event.getJob().getResult();
if (!result.isOK()) {
if (!fTreeViewer.getControl().isDisposed()) {
- ErrorDialog.openError(fTreeViewer.getTree().getShell(), Messages.TargetLocationsGroup_TargetUpdateErrorDialog, result.getMessage(), result);
+ ErrorDialog.openError(fTreeViewer.getTree().getShell(),
+ Messages.TargetLocationsGroup_TargetUpdateErrorDialog, result.getMessage(),
+ result);
}
- } else if (result.getCode() != ITargetLocationUpdater.STATUS_CODE_NO_CHANGE) {
- // Update was successful and changed the target, if dialog/editor still open, update it
+ } else if (result.getCode() != ITargetLocationHandler.STATUS_CODE_NO_CHANGE) {
+ // Update was successful and changed the target, if
+ // dialog/editor still open, update it
if (!fTreeViewer.getControl().isDisposed()) {
contentsChanged(true);
fTreeViewer.refresh(true);
updateButtons();
}
- // If the target is the current platform, run a load job for the user
+ // If the target is the current platform, run a load
+ // job for the user
try {
ITargetPlatformService service = PDECore.getDefault()
.acquireService(ITargetPlatformService.class);
@@ -475,7 +439,8 @@
LoadTargetDefinitionJob.load(fTarget);
}
} catch (CoreException e) {
- // do nothing if we could not set the current target.
+ // do nothing if we could not set the current
+ // target.
}
}
return Status.OK_STATUS;
@@ -484,86 +449,58 @@
job.schedule();
}
};
- UpdateTargetJob.update(fTarget, toUpdate, listener);
+ UpdateTargetJob.update(updateActions, listener);
}
private void updateButtons() {
- IStructuredSelection selection = fTreeViewer.getStructuredSelection();
+ ITreeSelection selection = fTreeViewer.getStructuredSelection();
if (selection.isEmpty()) {
fRemoveButton.setEnabled(false);
+ fRemoveButton.setText(Messages.BundleContainerTable_Btn_Text_Remove);
+ fRemoveButton.setData(BUTTON_STATE, DeleteButtonState.NONE);
fUpdateButton.setEnabled(false);
fEditButton.setEnabled(false);
+ return;
}
-
boolean canRemove = false;
boolean canEdit = false;
boolean canUpdate = false;
- for (Iterator<?> iterator = selection.iterator(); iterator.hasNext();) {
+ boolean canEnable = false;
+ boolean canDisable = false;
- Object currentSelection = iterator.next();
- if (currentSelection instanceof ITargetLocation) {
- canRemove = true;
- if (!canEdit) {
- ITargetLocation location = (ITargetLocation) currentSelection;
- ITargetLocationEditor editor = Adapters.adapt(location, ITargetLocationEditor.class);
- if (editor != null) {
- canEdit = editor.canEdit(fTarget, location);
- }
- if (location instanceof AbstractBundleContainer) {
- // TODO Custom code for locations that don't use adapters yet
- canEdit = true;
- }
- }
- if (!canUpdate) {
- ITargetLocation location = (ITargetLocation) currentSelection;
- ITargetLocationUpdater updater = Adapters.adapt(location, ITargetLocationUpdater.class);
- if (updater != null) {
- canUpdate = updater.canUpdate(fTarget, location);
- }
- }
-
- } else if (currentSelection instanceof IUWrapper) {
- // TODO Custom code to support editing/updating/removal of individual IUs
- canRemove = true;
- canEdit = true;
- canUpdate = true;
- }
- if (canRemove && canEdit && canUpdate) {
+ TreePath[] paths = selection.getPaths();
+ for (TreePath path : paths) {
+ canRemove |= ADAPTER.canRemove(fTarget, path);
+ canDisable |= ADAPTER.canDisable(fTarget, path);
+ canEnable |= ADAPTER.canEnable(fTarget, path);
+ canUpdate |= ADAPTER.canUpdate(fTarget, path);
+ canEdit = paths.length == 1 && ADAPTER.canEdit(fTarget, path);
+ }
+ fEditButton.setEnabled(canEdit);
+ fUpdateButton.setEnabled(canUpdate);
+ DeleteButtonState state = DeleteButtonState.computeState(canRemove, canEnable, canDisable);
+ switch (state)
+ {
+ case DISABLE:
+ fRemoveButton.setText(Messages.BundleContainerTable_Btn_Text_Disable);
+ break;
+ case ENABLE:
+ fRemoveButton.setText(Messages.BundleContainerTable_Btn_Text_Enable);
+ break;
+ case TOGGLE:
+ fRemoveButton.setText(Messages.BundleContainerTable_Btn_Text_Toggle);
+ break;
+ default:
+ fRemoveButton.setText(Messages.BundleContainerTable_Btn_Text_Remove);
break;
}
-
- }
- fRemoveButton.setEnabled(canRemove);
- fEditButton.setEnabled(canEdit && fTarget.isResolved());
- fUpdateButton.setEnabled(canUpdate);
-
- // TODO Some code to find the parent location of items in the tree
- // For each selected item, find it's parent location and add it to the set
-// for (int i = 0; i < treeSelection.length; i++) {
-// TreeItem current = treeSelection[i];
-// while (current != null){
-// if (current instanceof ITargetLocation){
-// selectedLocations.add(current);
-// break;
-// }
-// current = current.getParentItem();
-// }
-// }
-
+ fRemoveButton.setEnabled(state != DeleteButtonState.NONE);
+ fRemoveButton.setData(BUTTON_STATE, state);
}
private void handleReload() {
-
- //delete profile
- try {
- // TODO might want to merge forceCheckTarget into delete Profile?
- P2TargetUtils.forceCheckTarget(fTarget);
- P2TargetUtils.deleteProfile(fTarget.getHandle());
- } catch (CoreException e) {
- PDEPlugin.log(e);
- }
-
+ log(ADAPTER.reload(fTarget, fTarget.getTargetLocations(), new NullProgressMonitor()));
Job job = new UIJob("Reloading...") { //$NON-NLS-1$
@Override
public IStatus runInUIThread(IProgressMonitor monitor) {
@@ -574,9 +511,10 @@
job.schedule();
}
+
/**
- * Informs the reporter for this table that something has changed
- * and is dirty.
+ * Informs the reporter for this table that something has changed and is
+ * dirty.
*/
private void contentsChanged(boolean force) {
for (ITargetChangedListener listener : fChangeListeners) {
@@ -595,4 +533,11 @@
}
+ private static IStatus log(IStatus status) {
+ if (status != null && !status.isOK()) {
+ PDEPlugin.log(status);
+ }
+ return status;
+ }
+
}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/ToggleIncludeHandler.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/ToggleIncludeHandler.java
new file mode 100644
index 0000000..261a2b1
--- /dev/null
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/ToggleIncludeHandler.java
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Christoph Läubrich and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Christoph Läubrich - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.shared.target;
+
+import java.util.*;
+import java.util.function.Function;
+import java.util.function.Predicate;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.TreePath;
+import org.eclipse.pde.core.target.ITargetDefinition;
+import org.eclipse.pde.core.target.NameVersionDescriptor;
+import org.eclipse.pde.internal.core.target.TargetDefinition;
+import org.eclipse.pde.ui.target.ITargetLocationHandler;
+
+public class ToggleIncludeHandler<DescriptorType> implements ITargetLocationHandler {
+
+ private int uiMode;
+ private Function<ITargetDefinition, DescriptorType[]> descriptorAccessor;
+ private Function<DescriptorType, NameVersionDescriptor> mapper;
+ private Class<DescriptorType> type;
+
+ public ToggleIncludeHandler(Class<DescriptorType> type, int uiMode,
+ Function<ITargetDefinition, DescriptorType[]> descriptorAccessor,
+ Function<DescriptorType, NameVersionDescriptor> mapper) {
+ this.type = type;
+ this.uiMode = uiMode;
+ this.descriptorAccessor = descriptorAccessor;
+ this.mapper = mapper;
+ }
+
+ @Override
+ public boolean canDisable(ITargetDefinition target, TreePath treePath) {
+ Object lastSegment = treePath.getLastSegment();
+ if (type.isInstance(lastSegment)) {
+ if (target instanceof TargetDefinition) {
+ if (((TargetDefinition) target).getUIMode() != uiMode) {
+ return false;
+ }
+ }
+ NameVersionDescriptor[] included = target.getIncluded();
+ return included == null || getIndex(mapper.apply(type.cast(lastSegment)), included) > -1;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean canEnable(ITargetDefinition target, TreePath treePath) {
+ Object lastSegment = treePath.getLastSegment();
+ if (type.isInstance(lastSegment)) {
+ if (target instanceof TargetDefinition) {
+ if (((TargetDefinition) target).getUIMode() != uiMode) {
+ return false;
+ }
+ }
+ NameVersionDescriptor[] included = target.getIncluded();
+ return included != null && getIndex(mapper.apply(type.cast(lastSegment)), included) < 0;
+ }
+ return false;
+ }
+
+ @Override
+ public IStatus toggle(ITargetDefinition target, TreePath[] treePath) {
+ Set<NameVersionDescriptor> workingSet = Arrays.stream(treePath).map(TreePath::getLastSegment).filter(type::isInstance)
+ .map(type::cast).map(mapper).collect(Collectors.toSet());
+ if (workingSet.isEmpty()) {
+ return Status.CANCEL_STATUS;
+ }
+ NameVersionDescriptor[] included = target.getIncluded();
+ Stream<NameVersionDescriptor> stream;
+ if (included == null) {
+ DescriptorType[] all = descriptorAccessor.apply(target);
+ if (all == null) {
+ return Status.CANCEL_STATUS;
+ }
+ stream = Arrays.stream(all).map(mapper).filter(Predicate.not(workingSet::contains));
+ } else {
+ Map<Boolean, List<NameVersionDescriptor>> lists = workingSet.stream()
+ .collect(Collectors.partitioningBy(t -> getIndex(t, included) > -1));
+ Set<NameVersionDescriptor> exclude = new HashSet<>(lists.get(Boolean.TRUE));
+ List<NameVersionDescriptor> include = lists.get(Boolean.FALSE);
+ stream = Stream.concat(Arrays.stream(included).filter(Predicate.not(exclude::contains)), include.stream());
+ }
+ target.setIncluded(stream.toArray(NameVersionDescriptor[]::new));
+ if (target instanceof TargetDefinition) {
+ ((TargetDefinition) target).incrementSequenceNumber();
+ }
+ return Status.OK_STATUS;
+ }
+
+ private static int getIndex(NameVersionDescriptor searchDescriptor, NameVersionDescriptor[] included) {
+ if (included != null && searchDescriptor != null) {
+ for (int i = 0; i < included.length; i++) {
+ NameVersionDescriptor descriptor = included[i];
+ if (searchDescriptor.equals(descriptor)) {
+ return i;
+ }
+ }
+ }
+ return -1;
+ }
+
+}
\ No newline at end of file
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/UpdateTargetJob.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/UpdateTargetJob.java
index 4805a90..0484e6e 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/UpdateTargetJob.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/UpdateTargetJob.java
@@ -11,56 +11,59 @@
* Contributors:
* EclipseSource Inc. - initial API and implementation
* Martin Karpisek <martin.karpisek@gmail.com> - Bug 507831
- * Christoph Läubrich - Bug 567506
+ * Christoph Läubrich Bug 567506 - TargetLocationsGroup.handleEdit() should activate bundles if necessary
+ * Bug 568865 - [target] add advanced editing capabilities for custom target platforms
*******************************************************************************/
package org.eclipse.pde.internal.ui.shared.target;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
+import java.util.*;
import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.IJobChangeListener;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.osgi.util.NLS;
+import org.eclipse.core.runtime.jobs.*;
import org.eclipse.pde.core.target.ITargetDefinition;
import org.eclipse.pde.core.target.ITargetLocation;
import org.eclipse.pde.internal.core.PDECore;
-import org.eclipse.pde.internal.core.target.IUBundleContainer;
-import org.eclipse.pde.ui.target.ITargetLocationUpdater;
+import org.eclipse.pde.ui.target.ITargetLocationHandler;
/**
- * Updates selected target locations using {@link ITargetLocationUpdater}s in an asynchronous job
+ * Updates selected target locations using a list of {@link IJobFunction}s in an
+ * asynchronous job
* <p>
- * If all calls to {@link ITargetLocationUpdater#update(org.eclipse.pde.core.target.ITargetDefinition, ITargetLocation, IProgressMonitor)}
- * return an OK status with {@link ITargetLocationUpdater#STATUS_CODE_NO_CHANGE}, the returned status will also have that status code,
- * indicating that no changes were made to the target.
+ * If all calls to {@link IJobFunction#run(IProgressMonitor)} return an OK
+ * status with {@link ITargetLocationHandler#STATUS_CODE_NO_CHANGE}, the
+ * returned status will also have that status code, indicating that no changes
+ * were made to the target.
*/
public class UpdateTargetJob extends Job {
public static final String JOB_FAMILY_ID = "UpdateTargetJob"; //$NON-NLS-1$
- private Map<ITargetLocation, Set<Object>> toUpdate;
- private ITargetDefinition fTarget;
+ private List<IJobFunction> toUpdate;
/**
- * Schedules a new update job that will update all target locations in the provided map. A target's selected
- * children can be added as a set to the values of the map so that only certain portions of the target
- * location get updated.
+ * Schedules a new update job that will update all target locations in the
+ * provided map. A target's selected children can be added as a set to the
+ * values of the map so that only certain portions of the target location
+ * get updated.
* <p>
- * TODO The {@link ITargetLocationUpdater} does not currently support updating children
- * </p><p>
- * If all calls to {@link ITargetLocationUpdater#update(org.eclipse.pde.core.target.ITargetDefinition, ITargetLocation, IProgressMonitor)}
- * return an OK status with {@link ITargetLocationUpdater#STATUS_CODE_NO_CHANGE}, the returned status will also have that status code,
- * indicating that no changes were made to the target.
+ * If all calls to {@link IJobFunction#run(IProgressMonitor)} return an OK
+ * status with {@link ITargetLocationHandler#STATUS_CODE_NO_CHANGE}, the
+ * returned status will also have that status code, indicating that no
+ * changes were made to the target.
* </p>
- * @param target the target being updated
- * @param toUpdate maps {@link ITargetLocation}s to the {@link Set} of selected children items
- * that should be updated. The sets may be empty, but not <code>null</code>
- * @param listener job change listener that will be added to the created job, can be <code>null</code>
+ *
+ * @param target
+ * the target being updated
+ * @param updateActions
+ * maps {@link ITargetLocation}s to the {@link Set} of selected
+ * children items that should be updated. The sets may be empty,
+ * but not <code>null</code>
+ * @param listener
+ * job change listener that will be added to the created job, can
+ * be <code>null</code>
*/
- public static void update(ITargetDefinition target, Map<ITargetLocation, Set<Object>> toUpdate, IJobChangeListener listener) {
+ public static void update(List<IJobFunction> updateActions, IJobChangeListener listener) {
Job.getJobManager().cancel(JOB_FAMILY_ID);
- Job job = new UpdateTargetJob(toUpdate, target);
+ Job job = new UpdateTargetJob(updateActions);
job.setUser(true);
if (listener != null) {
job.addJobChangeListener(listener);
@@ -71,60 +74,31 @@
/**
* Use {@link #update(ITargetDefinition, Map, IJobChangeListener)} instead
*/
- private UpdateTargetJob(Map<ITargetLocation, Set<Object>> toUpdate, ITargetDefinition target) {
+ private UpdateTargetJob(List<IJobFunction> updateActions) {
super(Messages.UpdateTargetJob_UpdateJobName);
- this.toUpdate = toUpdate;
- fTarget = target;
+ this.toUpdate = updateActions;
}
@Override
protected IStatus run(IProgressMonitor monitor) {
- SubMonitor progress = SubMonitor.convert(monitor, Messages.UpdateTargetJob_UpdatingTarget, toUpdate.size() * 100);
- MultiStatus errors = new MultiStatus(PDECore.PLUGIN_ID, 0, Messages.UpdateTargetJob_TargetUpdateFailedStatus, null);
+ SubMonitor progress = SubMonitor.convert(monitor, Messages.UpdateTargetJob_UpdatingTarget,
+ toUpdate.size() * 100);
+ MultiStatus errors = new MultiStatus(PDECore.PLUGIN_ID, 0, Messages.UpdateTargetJob_TargetUpdateFailedStatus,
+ null);
boolean noChange = true;
- for (Entry<ITargetLocation, Set<Object>> entry : toUpdate.entrySet()) {
- ITargetLocation location = entry.getKey();
- Set<Object> children = entry.getValue();
-
- String path = null;
- try {
- path = location.getLocation(false);
- } catch (CoreException e1) {
- // Ignore as this is just for the subtask
- }
- progress.subTask(NLS.bind(Messages.UpdateTargetJob_UpdatingContainer, path));
-
- // TODO Custom code for IUBundleContainers with children selected
- if (location instanceof IUBundleContainer && !children.isEmpty()) {
- try {
- boolean result = ((IUBundleContainer) location).update(children, progress.split(100));
- if (result) {
- noChange = false;
- }
- } catch (CoreException e) {
- errors.add(e.getStatus());
- }
- } else {
- ITargetLocationUpdater provider = Adapters.adapt(location, ITargetLocationUpdater.class);
- if (provider != null) {
- if (provider.canUpdate(fTarget, location)) {
- IStatus result = provider.update(fTarget, location, progress.split(100));
- if (result.isOK() && result.getCode() != ITargetLocationUpdater.STATUS_CODE_NO_CHANGE) {
- noChange = false;
- } else if (!result.isOK()) {
- noChange = false;
- errors.add(result);
- }
- }
- } else {
- // If the button enablement is correct, this should not get hit
- progress.worked(100);
- }
+ for (IJobFunction action : toUpdate) {
+ IStatus result = action.run(progress.split(100));
+ if (result.isOK() && result.getCode() != ITargetLocationHandler.STATUS_CODE_NO_CHANGE) {
+ noChange = false;
+ } else if (!result.isOK()) {
+ noChange = false;
+ errors.add(result);
}
}
progress.done();
if (noChange) {
- return new Status(IStatus.OK, PDECore.PLUGIN_ID, ITargetLocationUpdater.STATUS_CODE_NO_CHANGE, Messages.UpdateTargetJob_TargetUpdateSuccessStatus, null);
+ return new Status(IStatus.OK, PDECore.PLUGIN_ID, ITargetLocationHandler.STATUS_CODE_NO_CHANGE,
+ Messages.UpdateTargetJob_TargetUpdateSuccessStatus, null);
} else if (!errors.isOK()) {
return errors;
} else {
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/messages.properties b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/messages.properties
index 21bd0f8..6af7a0b 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/messages.properties
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/messages.properties
@@ -51,17 +51,19 @@
ArgumentsFromContainerSelectionDialog_3=&Select All
ArgumentsFromContainerSelectionDialog_4=&Deselect All
ArgumentsFromContainerSelectionDialog_5=No arguments could be found in the installations in this target.
-BundleContainerTable_0=&Add...
-BundleContainerTable_1=&Edit...
-BundleContainerTable_2=&Remove
-BundleContainerTable_3=&Update
-BundleContainerTable_4=Re&load
+BundleContainerTable_Btn_Text_Add=&Add...
+BundleContainerTable_Btn_Text_Edit=&Edit...
+BundleContainerTable_Btn_Text_Remove=&Remove
+BundleContainerTable_Btn_Text_Update=&Update
+BundleContainerTable_Btn_Text_Reload=Re&load
BundleContainerTable_8=Unspecified Site
# Styled label section describing number of plug-ins in the location
# example: 12 plug-ins
BundleContainerTable_10={0} plug-ins available
-
+BundleContainerTable_Btn_Text_Enable=&Include
+BundleContainerTable_Btn_Text_Disable=E&xclude
+BundleContainerTable_Btn_Text_Toggle=&Toggle
BundleContainerTable_14=&Plug-ins
BundleContainerTable_15=Source &bundles
BundleContainerTable_9=Show:
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/site/NewSiteProjectCreationPage.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/site/NewSiteProjectCreationPage.java
index 197868a..a8841df 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/site/NewSiteProjectCreationPage.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/site/NewSiteProjectCreationPage.java
@@ -41,9 +41,6 @@
super(pageName);
}
- /** (non-Javadoc)
- * Method declared on IDialogPage.
- */
@Override
public void createControl(Composite parent) {
super.createControl(parent);
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/ConfigurationTab.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/ConfigurationTab.java
index 0cced62..12500ad 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/ConfigurationTab.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/ConfigurationTab.java
@@ -147,10 +147,6 @@
return org.eclipse.pde.launching.IPDELauncherConstants.TAB_CONFIGURATION_ID;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#initializeAttributes()
- */
@Override
protected void initializeAttributes() {
super.initializeAttributes();
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/MainTab.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/MainTab.java
index fa97605..67d90dc 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/MainTab.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/MainTab.java
@@ -196,10 +196,6 @@
return org.eclipse.pde.launching.IPDELauncherConstants.TAB_MAIN_ID;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#initializeAttributes()
- */
@Override
protected void initializeAttributes() {
super.initializeAttributes();
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/PluginsTab.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/PluginsTab.java
index a86920a..21357fa 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/PluginsTab.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/PluginsTab.java
@@ -223,10 +223,6 @@
return IPDELauncherConstants.TAB_PLUGINS_ID;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#initializeAttributes()
- */
@Override
protected void initializeAttributes() {
super.initializeAttributes();
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/TracingTab.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/TracingTab.java
index 0a30a06..46d37f7 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/TracingTab.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/TracingTab.java
@@ -110,10 +110,6 @@
return IPDELauncherConstants.TAB_TRACING_ID;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#initializeAttributes()
- */
@Override
protected void initializeAttributes() {
super.initializeAttributes();
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/target/ITargetLocationEditor.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/target/ITargetLocationEditor.java
index 6b5aa09..e5f46fc 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/target/ITargetLocationEditor.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/target/ITargetLocationEditor.java
@@ -18,12 +18,14 @@
import org.eclipse.pde.core.target.ITargetLocation;
/**
- * Contributed target locations that want to support editing in the target wizard and editor must adapt
- * their {@link ITargetLocation} to this interface.
+ * Contributed target locations that want to support editing in the target
+ * wizard and editor must adapt their {@link ITargetLocation} to this interface.
*
* @noextend This interface is not intended to be extended by clients.
+ * @deprecated use {@link ITargetLocationHandler} instead
* @since 3.7
*/
+@Deprecated
public interface ITargetLocationEditor {
/**
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/target/ITargetLocationHandler.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/target/ITargetLocationHandler.java
new file mode 100644
index 0000000..727641e
--- /dev/null
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/target/ITargetLocationHandler.java
@@ -0,0 +1,200 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Christoph Läubrich and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Christoph Läubrich - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.ui.target;
+
+import org.eclipse.core.runtime.*;
+import org.eclipse.jface.viewers.TreePath;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.pde.core.target.ITargetDefinition;
+import org.eclipse.pde.core.target.ITargetLocation;
+
+/**
+ * Contributed target locations that want to support extended editing of target
+ * locations can implement this interface
+ *
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 3.13
+ */
+public interface ITargetLocationHandler {
+
+ /**
+ * Status code that can be set on an OK status returned by
+ * {@link #update(ITargetDefinition, TreePath[], IProgressMonitor)} to
+ * indicate that there is no newer version
+ */
+ int STATUS_CODE_NO_CHANGE = 101;
+ /**
+ * Status code that can be set on an OK status returned by
+ * {@link #update(ITargetDefinition, TreePath[], IProgressMonitor)},
+ * {@link #remove(ITargetDefinition, TreePath[])} or
+ * {@link #toggle(ITargetDefinition, TreePath[])} to indicate that a
+ * complete target refresh is desired
+ */
+ int STATUS_FORCE_RELOAD = 102;
+
+ /**
+ * Returns whether this handler can edit the element described by the given
+ * {@link TreePath}
+ *
+ * @param target
+ * the target definition being edited
+ * @param treePath
+ * the path to be edited
+ * @return whether this editor can edit the given path of child elements
+ */
+ default boolean canEdit(ITargetDefinition target, TreePath treePath) {
+ return getEditWizard(target, treePath) != null;
+ }
+
+ /**
+ * Returns whether this handler can update the element described by the
+ * given {@link TreePath}
+ *
+ * @param target
+ * the target definition being edited
+ * @param treePath
+ * the path to be checked
+ * @return whether this editor can update the given path of child elements
+ */
+ default boolean canUpdate(ITargetDefinition target, TreePath treePath) {
+ return false;
+ }
+
+ /**
+ * Returns whether this handler can remove the element described by the
+ * given {@link TreePath}
+ *
+ * @param target
+ * the target definition being edited
+ * @param treePath
+ * the path to be checked
+ * @return whether this editor can remove the given path of child elements
+ */
+ default boolean canRemove(ITargetDefinition target, TreePath treePath) {
+ return false;
+ }
+
+ /**
+ * Returns whether this handler can disable the element described by the
+ * given {@link TreePath}
+ *
+ * @param target
+ * the target definition being edited
+ * @param treePath
+ * the path to be checked
+ * @return whether this editor can disable the given path of child elements
+ */
+ default boolean canDisable(ITargetDefinition target, TreePath treePath) {
+ return false;
+ }
+
+ /**
+ * Returns whether this handler can enable the element described by the
+ * given {@link TreePath}
+ *
+ * @param target
+ * the target definition being edited
+ * @param treePath
+ * the path to be checked
+ * @return whether this editor can enable the given path of child elements
+ */
+ default boolean canEnable(ITargetDefinition target, TreePath treePath) {
+ return false;
+ }
+
+ /**
+ * Returns a wizard that will be opened to edit the element described by the
+ * given {@link TreePath} The wizard is responsible for modifying the target
+ * location and/or target. The target definition will be resolved if the
+ * wizard completes successfully.
+ *
+ * @param target
+ * the target definition being edited
+ * @param treePath
+ * the path to be edited
+ * @return wizard to open for editing the {@link TreePath} or
+ * <code>null</code> if editing of the element is not possible
+ */
+ default IWizard getEditWizard(ITargetDefinition target, TreePath treePath) {
+ return null;
+ }
+
+ /**
+ * Updates the items given in treePath in the given target to the latest
+ * version
+ *
+ * @param target
+ * the target definition being updated
+ * @param treePaths
+ * the array of path to be updated
+ * @param monitor
+ * to report progress of the update operation
+ * @return result of the update, use an OK status with
+ * {@link #STATUS_CODE_NO_CHANGE} to indicate everything is up to
+ * date, and {@link #STATUS_FORCE_RELOAD} to force a reload of the
+ * target platform
+ */
+ default IStatus update(ITargetDefinition target, TreePath[] treePaths, IProgressMonitor monitor) {
+ return Status.CANCEL_STATUS;
+ }
+
+ /**
+ * Called when the given targetLocations in the given target a re 'reloaded'
+ * and the user wants to completely reload any cached state.
+ *
+ * @param target
+ * the target definition being edited
+ * @param targetLocations
+ * the locations to reload
+ * @param monitor
+ * to report progress of the reload operation
+ * @return the result of the reload
+ */
+ default IStatus reload(ITargetDefinition target, ITargetLocation[] targetLocations, IProgressMonitor monitor) {
+ // default does nothing
+ return Status.OK_STATUS;
+ }
+
+ /**
+ * Called when the user request to remove the given items from the target
+ *
+ * @param target
+ * the target definition being edited
+ * @param treePaths
+ * the array of path to be removed
+ * @return result of the update, use an OK status with
+ * {@link #STATUS_FORCE_RELOAD} to force a reload of the target
+ * platform
+ */
+ default IStatus remove(ITargetDefinition target, TreePath[] treePaths) {
+ return Status.CANCEL_STATUS;
+ }
+
+ /**
+ * Called when the user request to toggle the enabled/disabled state of the
+ * given items from the target
+ *
+ * @param target
+ * the target definition being edited
+ * @param treePaths
+ * the array of path to toggle
+ * @return result of the update, use an OK status with
+ * {@link #STATUS_FORCE_RELOAD} to force a reload of the target
+ * platform
+ */
+ default IStatus toggle(ITargetDefinition target, TreePath[] treePaths) {
+ return Status.CANCEL_STATUS;
+ }
+
+}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/target/ITargetLocationUpdater.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/target/ITargetLocationUpdater.java
index de6fba2..74e2e34 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/target/ITargetLocationUpdater.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/target/ITargetLocationUpdater.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
+ * Copyright (c) 2011, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Christoph Läubrich - Bug 568865 - [target] add advanced editing capabilities for custom target platforms
*******************************************************************************/
package org.eclipse.pde.ui.target;
@@ -19,12 +20,14 @@
import org.eclipse.pde.core.target.ITargetLocation;
/**
- * Contributed target locations that want to support updating in the target wizard and editor must adapt
- * their {@link ITargetLocation} to this interface.
+ * Contributed target locations that want to support updating in the target
+ * wizard and editor must adapt their {@link ITargetLocation} to this interface.
*
* @noextend This interface is not intended to be extended by clients.
+ * @deprecated use {@link ITargetLocationHandler} instead
* @since 3.7
*/
+@Deprecated
public interface ITargetLocationUpdater {
/**
@@ -33,7 +36,7 @@
* If this status code is set, the target will not resolve the target after the update completes.
* </p>
*/
- public static final int STATUS_CODE_NO_CHANGE = 101;
+ public static final int STATUS_CODE_NO_CHANGE = ITargetLocationHandler.STATUS_CODE_NO_CHANGE;
/**
* Returns whether this updater can update the given target location. This method will be called
diff --git a/ui/org.eclipse.tools.layout.spy/.classpath b/ui/org.eclipse.tools.layout.spy/.classpath
index eca7bdb..e801ebf 100644
--- a/ui/org.eclipse.tools.layout.spy/.classpath
+++ b/ui/org.eclipse.tools.layout.spy/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
diff --git a/ui/org.eclipse.tools.layout.spy/.settings/org.eclipse.jdt.core.prefs b/ui/org.eclipse.tools.layout.spy/.settings/org.eclipse.jdt.core.prefs
index 1976fd2..c45cb10 100644
--- a/ui/org.eclipse.tools.layout.spy/.settings/org.eclipse.jdt.core.prefs
+++ b/ui/org.eclipse.tools.layout.spy/.settings/org.eclipse.jdt.core.prefs
@@ -1,12 +1,16 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
@@ -14,19 +18,22 @@
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0
+org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16
org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16
org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
@@ -116,11 +123,12 @@
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
@@ -151,6 +159,8 @@
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
@@ -175,13 +185,17 @@
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
@@ -229,6 +243,8 @@
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
@@ -265,9 +281,12 @@
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
@@ -303,9 +322,13 @@
org.eclipse.jdt.core.formatter.tabulation.size=4
org.eclipse.jdt.core.formatter.use_on_off_tags=false
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true
org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter
diff --git a/ui/org.eclipse.tools.layout.spy/META-INF/MANIFEST.MF b/ui/org.eclipse.tools.layout.spy/META-INF/MANIFEST.MF
index b6a3a59..44f24e1 100644
--- a/ui/org.eclipse.tools.layout.spy/META-INF/MANIFEST.MF
+++ b/ui/org.eclipse.tools.layout.spy/META-INF/MANIFEST.MF
@@ -2,8 +2,8 @@
Bundle-ManifestVersion: 2
Bundle-Name: %name
Bundle-SymbolicName: org.eclipse.tools.layout.spy;singleton:=true
-Bundle-Version: 1.0.600.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-Version: 1.1.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Localization: plugin
Require-Bundle: org.eclipse.swt;bundle-version="3.106.0",
org.eclipse.jface.databinding;bundle-version="1.9.0",
diff --git a/ui/org.eclipse.tools.layout.spy/pom.xml b/ui/org.eclipse.tools.layout.spy/pom.xml
index 354d3b1..8ef9885 100644
--- a/ui/org.eclipse.tools.layout.spy/pom.xml
+++ b/ui/org.eclipse.tools.layout.spy/pom.xml
@@ -19,7 +19,7 @@
</parent>
<groupId>org.eclipse.pde</groupId>
<artifactId>org.eclipse.tools.layout.spy</artifactId>
- <version>1.0.600-SNAPSHOT</version>
+ <version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/ui/org.eclipse.tools.layout.spy/src/org/eclipse/tools/layout/spy/internal/handlers/LayoutSpyHandler.java b/ui/org.eclipse.tools.layout.spy/src/org/eclipse/tools/layout/spy/internal/handlers/LayoutSpyHandler.java
index 2f84586..45ab6e4 100644
--- a/ui/org.eclipse.tools.layout.spy/src/org/eclipse/tools/layout/spy/internal/handlers/LayoutSpyHandler.java
+++ b/ui/org.eclipse.tools.layout.spy/src/org/eclipse/tools/layout/spy/internal/handlers/LayoutSpyHandler.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2016 Google Inc and others.
+ * Copyright (c) 2016, 2020 Google Inc and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,6 +19,7 @@
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.tools.layout.spy.internal.dialogs.LayoutSpyDialog;
+import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.handlers.HandlerUtil;
public class LayoutSpyHandler extends AbstractHandler {
@@ -31,7 +32,16 @@
}
Shell shell = HandlerUtil.getActiveShell(event);
- if (shell != null) {
+ if (shell == null || shell.isDisposed()) {
+ // The active shell may have been disposed since the user initiated the command,
+ // such as when it was started via Find Actions dialog whose shell is disposed
+ // as a side effect of launching this handler
+ IWorkbenchWindow activeWorkbenchWindow = HandlerUtil.getActiveWorkbenchWindow(event);
+ if (activeWorkbenchWindow != null) {
+ shell = activeWorkbenchWindow.getShell();
+ }
+ }
+ if (shell != null && !shell.isDisposed()) {
popupDialog = new LayoutSpyDialog(shell);
popupDialog.open();
}
diff --git a/ui/org.eclipse.ui.trace/.classpath b/ui/org.eclipse.ui.trace/.classpath
index eca7bdb..e801ebf 100644
--- a/ui/org.eclipse.ui.trace/.classpath
+++ b/ui/org.eclipse.ui.trace/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
diff --git a/ui/org.eclipse.ui.trace/.settings/org.eclipse.jdt.core.prefs b/ui/org.eclipse.ui.trace/.settings/org.eclipse.jdt.core.prefs
index 21deb4b..60d28df 100644
--- a/ui/org.eclipse.ui.trace/.settings/org.eclipse.jdt.core.prefs
+++ b/ui/org.eclipse.ui.trace/.settings/org.eclipse.jdt.core.prefs
@@ -19,9 +19,9 @@
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -38,6 +38,7 @@
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
@@ -94,6 +95,7 @@
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
@@ -133,8 +135,10 @@
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=ignore
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
@@ -142,17 +146,20 @@
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16
org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
@@ -238,11 +245,12 @@
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
@@ -273,6 +281,8 @@
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
@@ -297,13 +307,17 @@
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
@@ -351,6 +365,8 @@
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
@@ -387,9 +403,12 @@
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
@@ -415,8 +434,12 @@
org.eclipse.jdt.core.formatter.tabulation.size=4
org.eclipse.jdt.core.formatter.use_on_off_tags=false
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
org.eclipse.jdt.core.incompatibleJDKLevel=ignore
org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/ui/org.eclipse.ui.trace/META-INF/MANIFEST.MF b/ui/org.eclipse.ui.trace/META-INF/MANIFEST.MF
index fb0979b..0168a89 100644
--- a/ui/org.eclipse.ui.trace/META-INF/MANIFEST.MF
+++ b/ui/org.eclipse.ui.trace/META-INF/MANIFEST.MF
@@ -2,10 +2,10 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.ui.trace;singleton:=true
-Bundle-Version: 1.1.800.qualifier
+Bundle-Version: 1.2.0.qualifier
Bundle-Activator: org.eclipse.ui.trace.internal.TracingUIActivator
Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.11.0,4.0.0)",
diff --git a/ui/org.eclipse.ui.trace/pom.xml b/ui/org.eclipse.ui.trace/pom.xml
index d0a0c3a..1808ea5 100644
--- a/ui/org.eclipse.ui.trace/pom.xml
+++ b/ui/org.eclipse.ui.trace/pom.xml
@@ -19,6 +19,6 @@
</parent>
<groupId>org.eclipse.ui</groupId>
<artifactId>org.eclipse.ui.trace</artifactId>
- <version>1.1.800-SNAPSHOT</version>
+ <version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/TracingComponentViewerFilter.java b/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/TracingComponentViewerFilter.java
index 6b6db8c..6b86ce6 100644
--- a/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/TracingComponentViewerFilter.java
+++ b/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/TracingComponentViewerFilter.java
@@ -59,11 +59,6 @@
}
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.dialogs.PatternFilter#isElementVisible(org.eclipse.jface.viewers.Viewer, java.lang.Object)
- */
@Override
public boolean isElementVisible(final Viewer viewer, final Object element) {
diff --git a/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/TracingPreferencePage.java b/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/TracingPreferencePage.java
index 0847773..e737865 100644
--- a/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/TracingPreferencePage.java
+++ b/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/TracingPreferencePage.java
@@ -112,9 +112,6 @@
// empty implementation
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.DialogPage#dispose()
- */
@Override
public void dispose() {
super.dispose();
diff --git a/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/TracingStartupMonitor.java b/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/TracingStartupMonitor.java
index 740d867..3352a37 100644
--- a/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/TracingStartupMonitor.java
+++ b/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/TracingStartupMonitor.java
@@ -23,18 +23,12 @@
private ServiceRegistration<StartupMonitor> registration;
- /* (non-Javadoc)
- * @see org.eclipse.osgi.service.runnable.StartupMonitor#update()
- */
@Override
public void update() {
// empty implementation
}
- /* (non-Javadoc)
- * @see org.eclipse.osgi.service.runnable.StartupMonitor#applicationRunning()
- */
@Override
public void applicationRunning() {
diff --git a/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/datamodel/AbstractTracingNode.java b/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/datamodel/AbstractTracingNode.java
index 064f97b..491b441 100644
--- a/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/datamodel/AbstractTracingNode.java
+++ b/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/datamodel/AbstractTracingNode.java
@@ -30,43 +30,28 @@
protected abstract void populateChildren();
- /* (non-Javadoc)
- * @see org.eclipse.ui.trace.internal.datamodel.TracingNode#getLabel()
- */
@Override
public String getLabel() {
return label;
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.trace.internal.datamodel.TracingNode#getParent()
- */
@Override
public TracingNode getParent() {
return parent;
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.trace.internal.datamodel.TracingNode#getChildren()
- */
@Override
public TracingNode[] getChildren() {
initialize();
return children.toArray(new TracingNode[children.size()]);
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.trace.internal.datamodel.TracingNode#hasChildren()
- */
@Override
public boolean hasChildren() {
initialize();
return children != null && children.size() > 0;
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.trace.internal.datamodel.TracingNode#addChild(org.eclipse.ui.trace.internal.datamodel.TracingNode)
- */
@Override
public void addChild(final TracingNode childNode) {
if (!children.contains(childNode)) {
@@ -84,17 +69,11 @@
}
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.trace.internal.datamodel.TracingNode#setLabel(java.lang.String)
- */
@Override
public void setLabel(final String label) {
this.label = label;
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.trace.internal.datamodel.TracingNode#setParent(org.eclipse.ui.trace.internal.datamodel.TracingNode)
- */
@Override
public void setParent(final TracingNode parent) {
if (this.parent == null) {
diff --git a/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/datamodel/TracingComponent.java b/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/datamodel/TracingComponent.java
index 33fec73..861a8d6 100644
--- a/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/datamodel/TracingComponent.java
+++ b/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/datamodel/TracingComponent.java
@@ -89,10 +89,6 @@
return builder.toString();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.trace.internal.datamodel.AbstractTracingNode#isEnabled()
- */
@Override
public boolean isEnabled() {
diff --git a/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/datamodel/TracingComponentDebugOption.java b/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/datamodel/TracingComponentDebugOption.java
index d7c2ecf..60ba97b 100644
--- a/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/datamodel/TracingComponentDebugOption.java
+++ b/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/datamodel/TracingComponentDebugOption.java
@@ -73,11 +73,6 @@
return builder.toString();
}
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#hashCode()
- */
@Override
public int hashCode() {
final int prime = 31;
@@ -87,11 +82,6 @@
return result;
}
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#equals(java.lang.Object)
- */
@Override
public boolean equals(final Object obj) {
if (this == obj) {
@@ -121,9 +111,6 @@
return true;
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.trace.internal.datamodel.TracingNode#isEnabled()
- */
@Override
public boolean isEnabled() {
boolean isEnabled = false;