Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 255849 - [Metadata] Wrong types and methods used in org.eclipse.ui.workbench
Summary: [Metadata] Wrong types and methods used in org.eclipse.ui.workbench
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M6   Edit
Assignee: Boris Bokowski CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 300410 (view as bug list)
Depends on: 257109
Blocks:
  Show dependency tree
 
Reported: 2008-11-19 13:26 EST by Olivier Thomann CLA
Modified: 2010-01-21 15:14 EST (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2008-11-19 13:26:40 EST
That bundle is supposed to be Foundation 1.0 compliant according to the 3.4
plan. Maybe this has changed for 3.5.
The EEs defined for this project are:
Bundle-RequiredExecutionEnvironment: J2SE-1.4,
 CDC-1.0/Foundation-1.0,
 J2SE-1.3

And for the compilation, pde.build ends up taking the first execution
environment which is 1.4. If pde.build would take the latest execution
environment, it would not compile.

The bundle execution environment should be changed to 1.4 or some type
references and method calls should be removed.

Here is the list of possible problematic references found by the new validation
from api tooling:
- java.lang.String.replaceAll(String, String)
- java.util.regex.Pattern and its methods
- java.lang.StringBuffer.append(StringBuffer)
- java.lang.String.split(String)
- RuntimeException(Throwable)
- Error(Throwable)
- java.lang.Throwable.initCause(Throwable)
- java.util.regex.Matcher and its methods
- javax.swing.SwingUtilities
- java.awt.KeyboardFocusManager
- javax.swing.FocusManager
- java.lang.Throwable.getStackTrace()
- java.lang.StackTraceElement.toString()

Let me know if any of these references is considered to be fine.

Here is the complete list that let you know in what types the references were found:
The method java.lang.String.replaceAll(String, String) referenced in org.eclipse.ui.activities.ActivityCategoryPreferencePage$AdvancedDialog is not defined in bundle's required execution environment: J2SE-1.3
The type java.util.regex.Pattern referenced in org.eclipse.ui.activities.IActivityPatternBinding is not defined in bundle's required execution environment: J2SE-1.3
The method java.lang.StringBuffer.append(StringBuffer) referenced in org.eclipse.ui.dialogs.FilteredItemsSelectionDialog$ItemsListLabelProvider is not defined in bundle's required execution environment: J2SE-1.3
The method java.lang.StringBuffer.append(StringBuffer) referenced in org.eclipse.ui.dialogs.FilteredItemsSelectionDialog$ItemsListLabelProvider is not defined in bundle's required execution environment: J2SE-1.3
The method java.lang.String.replaceAll(String, String) referenced in org.eclipse.ui.dialogs.SearchPattern is not defined in bundle's required execution environment: J2SE-1.3
The method java.lang.String.split(String) referenced in org.eclipse.ui.dialogs.WorkingSetConfigurationBlock is not defined in bundle's required execution environment: J2SE-1.3
The method java.lang.String.split(String) referenced in org.eclipse.ui.dialogs.WorkingSetConfigurationBlock is not defined in bundle's required execution environment: J2SE-1.3
The constructor RuntimeException(Throwable) referenced in org.eclipse.ui.internal.ExceptionHandler is not defined in bundle's required execution environment: J2SE-1.3
The constructor RuntimeException(Throwable) referenced in org.eclipse.ui.internal.StartupThreading is not defined in bundle's required execution environment: J2SE-1.3
The constructor Error(Throwable) referenced in org.eclipse.ui.internal.Workbench is not defined in bundle's required execution environment: J2SE-1.3
The method java.lang.Throwable.initCause(Throwable) referenced in org.eclipse.ui.internal.about.AboutBundleData is not defined in bundle's required execution environment: J2SE-1.3
The method java.lang.Throwable.initCause(Throwable) referenced in org.eclipse.ui.internal.about.AboutBundleData is not defined in bundle's required execution environment: J2SE-1.3
The type java.util.regex.Pattern referenced in org.eclipse.ui.internal.activities.ActivityPatternBinding is not defined in bundle's required execution environment: J2SE-1.3
The method java.util.regex.Pattern.compile(String) referenced in org.eclipse.ui.internal.activities.ActivityPatternBinding is not defined in bundle's required execution environment: J2SE-1.3
The method java.util.regex.Pattern.compile(String) referenced in org.eclipse.ui.internal.activities.ActivityPatternBinding is not defined in bundle's required execution environment: J2SE-1.3
The type java.util.regex.Pattern referenced in org.eclipse.ui.internal.activities.ActivityPatternBinding is not defined in bundle's required execution environment: J2SE-1.3
The method java.util.regex.Pattern.pattern() referenced in org.eclipse.ui.internal.activities.ActivityPatternBinding is not defined in bundle's required execution environment: J2SE-1.3
The method java.util.regex.Pattern.pattern() referenced in org.eclipse.ui.internal.activities.ActivityPatternBinding is not defined in bundle's required execution environment: J2SE-1.3
The type java.util.regex.Pattern referenced in org.eclipse.ui.internal.activities.ActivityPatternBinding is not defined in bundle's required execution environment: J2SE-1.3
The method java.util.regex.Pattern.compile(String) referenced in org.eclipse.ui.internal.activities.ActivityPatternBinding is not defined in bundle's required execution environment: J2SE-1.3
The method java.util.regex.Pattern.pattern() referenced in org.eclipse.ui.internal.activities.ActivityPatternBinding is not defined in bundle's required execution environment: J2SE-1.3
The method java.util.regex.Pattern.matcher(CharSequence) referenced in org.eclipse.ui.internal.activities.ActivityPatternBinding is not defined in bundle's required execution environment: J2SE-1.3
The method java.util.regex.Matcher.matches() referenced in org.eclipse.ui.internal.activities.ActivityPatternBinding is not defined in bundle's required execution environment: J2SE-1.3
The type java.util.regex.Pattern referenced in org.eclipse.ui.internal.activities.MutableActivityManager is not defined in bundle's required execution environment: J2SE-1.3
The type javax.swing.SwingUtilities referenced in org.eclipse.ui.internal.handlers.WidgetMethodHandler is not defined in bundle's required execution environment: CDC-1.0/Foundation-1.0
The type java.awt.KeyboardFocusManager referenced in org.eclipse.ui.internal.handlers.WidgetMethodHandler is not defined in bundle's required execution environment: J2SE-1.3
The type javax.swing.FocusManager referenced in org.eclipse.ui.internal.handlers.WidgetMethodHandler is not defined in bundle's required execution environment: CDC-1.0/Foundation-1.0
The method java.lang.Throwable.getStackTrace() referenced in org.eclipse.ui.internal.statushandlers.StackTraceSupportArea is not defined in bundle's required execution environment: J2SE-1.3
The method java.lang.StackTraceElement.toString() referenced in org.eclipse.ui.internal.statushandlers.StackTraceSupportArea is not defined in bundle's required execution environment: J2SE-1.3
The method java.lang.Throwable.getCause() referenced in org.eclipse.ui.internal.statushandlers.StackTraceSupportArea is not defined in bundle's required execution environment: J2SE-1.3
The method java.lang.Throwable.getCause() referenced in org.eclipse.ui.internal.statushandlers.StackTraceSupportArea is not defined in bundle's required execution environment: J2SE-1.3
Comment 1 Szymon Brandys CLA 2008-11-25 03:42:53 EST
org.eclipse.ui depends on org.eclipse.core.runtime which depends on org.eclipse.equinox.common. org.eclipse.equinox.common environments are Foundation 1.1 and J2SE-1.4. Shouldn't we change execution envs for all plug-ins that depend on equinox.xommon?
Comment 2 Boris Bokowski CLA 2008-12-08 13:25:58 EST
Moving to M5, I don't want to do this near the end of the milestone.
Comment 3 Boris Bokowski CLA 2009-03-03 21:52:12 EST
Fixes released to HEAD. We now claim that org.eclipse.ui.workbench runs on Foundation 1.1 or J2SE-1.4 and higher.

We still list J2SE-1.4 first because of API (org.eclipse.ui.activities.IActivityPatternBinding.getPattern()) that was introduced in 3.0 accidentally - the return type of that method is java.util.regex.Pattern which is not part of Foundation 1.1.

Because this is isolated, and only affects capabilities/activities, we do list the Foundation 1.1 BREE, but in second position.
Comment 4 Oleg Besedin CLA 2010-01-21 13:17:54 EST
*** Bug 300410 has been marked as a duplicate of this bug. ***
Comment 5 Susan McCourt CLA 2010-01-21 15:14:35 EST
(In reply to comment #3)
> Fixes released to HEAD. We now claim that org.eclipse.ui.workbench runs on
> Foundation 1.1 or J2SE-1.4 and higher.
> 
> We still list J2SE-1.4 first because of API
> (org.eclipse.ui.activities.IActivityPatternBinding.getPattern()) that was
> introduced in 3.0 accidentally - the return type of that method is
> java.util.regex.Pattern which is not part of Foundation 1.1.
> 
> Because this is isolated, and only affects capabilities/activities, we do list
> the Foundation 1.1 BREE, but in second position.

We should consider setting up an API usage problem filter for this case so we can track via tooling that this is known exception.  I suppose this really lives with the larger question of "are we going to start using the PDE environment descriptions and configure EE errors/warnings?"