This commit was manufactured by cvs2svn to create tag 'v20030514_R2_1_m'.
Sprout from master 2003-03-27 23:21:43 UTC droberts2 <droberts2> 'Javadoc correction'
Cherrypick from R2_1_maintenance 2003-05-14 09:45:57 UTC Martin Aeschlimann <maeschli> '33374':
org.eclipse.jdt.junit.core/plugin.xml
org.eclipse.jdt.junit/plugin.xml
org.eclipse.jdt.junit/scripts/exportplugin.xml
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/TestRunnerViewPart.java
org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/flow/FlowAnalyzer.java
org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/flow/LocalFlowInfo.java
org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/MoveCuUpdateCreator.java
org.eclipse.jdt.ui/plugin.xml
org.eclipse.jdt.ui/scripts/exportplugin.xml
org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/PullUpInputPage1.java
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPlugin.java
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/TopLevelTypeProblemsLabelDecorator.java
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/ClassPathDetector.java
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/NewVariableEntryDialog.java
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/StandardJavaElementContentProvider.java
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewPackageWizardPage.java
Delete:
org.eclipse.jdt.ui.vcm/.classpath
org.eclipse.jdt.ui.vcm/.cvsignore
org.eclipse.jdt.ui.vcm/.project
org.eclipse.jdt.ui.vcm/.vcm_meta
org.eclipse.jdt.ui.vcm/about.html
org.eclipse.jdt.ui.vcm/build.properties
org.eclipse.jdt.ui.vcm/plugin.properties
org.eclipse.jdt.ui.vcm/plugin.xml.off
org.eclipse.jdt.ui.vcm/scripts/exportplugin.xml
org.junit/.classpath
org.junit/.project
org.junit/about.html
org.junit/build.properties
org.junit/junit.jar
org.junit/junitsrc.zip
org.junit/plugin.properties
org.junit/plugin.xml
org.junit/scripts/exportplugin.xml
diff --git a/org.eclipse.jdt.junit.core/plugin.xml b/org.eclipse.jdt.junit.core/plugin.xml
index 4cbf842..a69de16 100644
--- a/org.eclipse.jdt.junit.core/plugin.xml
+++ b/org.eclipse.jdt.junit.core/plugin.xml
@@ -2,7 +2,7 @@
<plugin
id="org.eclipse.jdt.junit"
name="%pluginName"
- version="2.1.0"
+ version="2.1.1"
provider-name="%providerName"
class="org.eclipse.jdt.internal.junit.ui.JUnitPlugin">
diff --git a/org.eclipse.jdt.junit/plugin.xml b/org.eclipse.jdt.junit/plugin.xml
index 4cbf842..a69de16 100644
--- a/org.eclipse.jdt.junit/plugin.xml
+++ b/org.eclipse.jdt.junit/plugin.xml
@@ -2,7 +2,7 @@
<plugin
id="org.eclipse.jdt.junit"
name="%pluginName"
- version="2.1.0"
+ version="2.1.1"
provider-name="%providerName"
class="org.eclipse.jdt.internal.junit.ui.JUnitPlugin">
diff --git a/org.eclipse.jdt.junit/scripts/exportplugin.xml b/org.eclipse.jdt.junit/scripts/exportplugin.xml
index 435dd18..c3202e0 100644
--- a/org.eclipse.jdt.junit/scripts/exportplugin.xml
+++ b/org.eclipse.jdt.junit/scripts/exportplugin.xml
@@ -4,7 +4,7 @@
<tstamp/>
<property name="destdir" value="../../plugin-export" />
<property name="plugin" value="org.eclipse.jdt.junit" />
- <property name="version" value="_2.1.0" />
+ <property name="version" value="_2.1.1" />
<property name="dest" value="${destdir}/${plugin}${version}" />
</target>
diff --git a/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/TestRunnerViewPart.java b/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/TestRunnerViewPart.java
index 32baab3..a7b0f07 100644
--- a/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/TestRunnerViewPart.java
+++ b/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/TestRunnerViewPart.java
@@ -538,8 +538,8 @@
fStackViewIcon.dispose();
fTestRunOKDirtyIcon.dispose();
fTestRunFailDirtyIcon.dispose();
- fClipboard.dispose();
- getSite().getKeyBindingService().unregisterAction(fRerunLastTestAction);
+ if (fClipboard != null)
+ fClipboard.dispose();
}
private void start(final int total) {
@@ -790,7 +790,6 @@
fOriginalViewImage= getTitleImage();
fProgressImages= new ProgressImages();
WorkbenchHelp.setHelp(parent, IJUnitHelpContextIds.RESULTS_VIEW);
- getSite().getKeyBindingService().registerAction(fRerunLastTestAction);
}
private IStatusLineManager getStatusLine() {
diff --git a/org.eclipse.jdt.ui.vcm/.classpath b/org.eclipse.jdt.ui.vcm/.classpath
deleted file mode 100644
index b2cd8dd..0000000
--- a/org.eclipse.jdt.ui.vcm/.classpath
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="vcm"/>
- <classpathentry kind="src" path="/org.eclipse.core.boot"/>
- <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
- <classpathentry kind="src" path="/org.eclipse.core.resources"/>
- <classpathentry kind="src" path="/org.eclipse.ui"/>
- <classpathentry kind="src" path="/org.eclipse.vcm.core"/>
- <classpathentry kind="src" path="/org.eclipse.vcm.ui"/>
- <classpathentry kind="src" path="/org.eclipse.jdt.ui"/>
- <classpathentry kind="src" path="/org.eclipse.jdt.core"/>
- <classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.jdt.ui.vcm/.cvsignore b/org.eclipse.jdt.ui.vcm/.cvsignore
deleted file mode 100644
index fe99505..0000000
--- a/org.eclipse.jdt.ui.vcm/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-bin
-
diff --git a/org.eclipse.jdt.ui.vcm/.project b/org.eclipse.jdt.ui.vcm/.project
deleted file mode 100644
index c59eeba..0000000
--- a/org.eclipse.jdt.ui.vcm/.project
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jdt.ui.vcm</name>
- <comment></comment>
- <projects>
- <project>org.eclipse.jdt.ui</project>
- <project>org.eclipse.ui</project>
- <project>org.eclipse.jdt.core</project>
- <project>org.eclipse.core.boot</project>
- <project>org.eclipse.core.runtime</project>
- <project>org.eclipse.core.resources</project>
- <project>org.eclipse.swt</project>
- <project>org.eclipse.vcm.core</project>
- <project>org.eclipse.vcm.ui</project>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.team.cvs.core.cvsnature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.jdt.ui.vcm/.vcm_meta b/org.eclipse.jdt.ui.vcm/.vcm_meta
deleted file mode 100644
index 351bab6..0000000
--- a/org.eclipse.jdt.ui.vcm/.vcm_meta
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project-description>
- <nature id="org.eclipse.jdt.core.javanature"/>
- <reference project-name="org.eclipse.jdt.ui"/>
- <reference project-name="org.eclipse.ui"/>
- <reference project-name="org.eclipse.jdt.core"/>
- <reference project-name="org.eclipse.core.boot"/>
- <reference project-name="org.eclipse.core.runtime"/>
- <reference project-name="org.eclipse.core.resources"/>
- <reference project-name="org.eclipse.swt"/>
- <reference project-name="org.eclipse.vcm.core"/>
- <reference project-name="org.eclipse.vcm.ui"/>
- <builder name="org.eclipse.jdt.core.javabuilder">
- </builder>
-</project-description>
diff --git a/org.eclipse.jdt.ui.vcm/about.html b/org.eclipse.jdt.ui.vcm/about.html
deleted file mode 100644
index 768324e..0000000
--- a/org.eclipse.jdt.ui.vcm/about.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<html>
-<head>
-<title>About</title>
-<style type="text/css">
-p, table, td, th { font-family: arial, helvetica, geneva; font-size: 10pt}
-pre { font-family: "Courier New", Courier, mono; font-size: 10pt}
-h2 { font-family: arial, helvetica, geneva; font-size: 18pt; font-weight: bold ; line-height: 14px}
-code { font-family: "Courier New", Courier, mono; font-size: 10pt}
-sup { font-family: arial,helvetica,geneva; font-size: 10px}
-h3 { font-family: arial, helvetica, geneva; font-size: 14pt; font-weight: bold}
-li { font-family: arial, helvetica, geneva; font-size: 10pt}
-h1 { font-family: arial, helvetica, geneva; font-size: 28px; font-weight: bold}
-body { font-family: arial, helvetica, geneva; font-size: 10pt; clip: rect( ); margin-top: 5mm; margin-left: 3mm}
-</style>
-</head>
-<body lang="EN-US" link="blue" vlink="purple">
-<table border="0" cellspacing="5" cellpadding="2" width="100%" >
- <tr>
- <td align="LEFT" valign="TOP" colspan="2" bgcolor="#0080C0"><b><font color="#FFFFFF">About This Content</font></b></td>
- </tr>
- <tr>
- <td>
-<p>11th December, 2001</p>
-<h3>License</h3>
-<p>Eclipse.org makes available all content in this plug-in "Content". Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-<a href="http://www.eclipse.org/legal/cpl-v05.html">Common Public License Version 0.5</a> "CPL". For purposes of the CPL, "Program" will mean the Content.</p>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise
-made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such
-Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the CPL "Other License", any modifications, enhancements and/or
-other code and/or documentation "Modifications" uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the
-host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of
-the CPL.</p>
-</td></tr></table>
-</body>
-</html>
\ No newline at end of file
diff --git a/org.eclipse.jdt.ui.vcm/build.properties b/org.eclipse.jdt.ui.vcm/build.properties
deleted file mode 100644
index 836c70a..0000000
--- a/org.eclipse.jdt.ui.vcm/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-bin.includes = plugin.xml,\
- about.html,\
- plugin.properties,\
- *.jar
-source.jdtvcm.jar = vcm/
diff --git a/org.eclipse.jdt.ui.vcm/plugin.properties b/org.eclipse.jdt.ui.vcm/plugin.properties
deleted file mode 100644
index 6bab83a..0000000
--- a/org.eclipse.jdt.ui.vcm/plugin.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-#########################################
-# (c) Copyright IBM Corp. 2000, 2001.
-# All Rights Reserved.
-#########################################
-
-pluginName=Java Development Tools VCM UI
-
-TogglePackagesViewVersionLabels.label = Show &Version Info
-TogglePackagesViewVersionLabels.tooltip = Show Version Info in the Packages View
-Managing = Team
-ManageGroupMenu.label = &Team
\ No newline at end of file
diff --git a/org.eclipse.jdt.ui.vcm/plugin.xml.off b/org.eclipse.jdt.ui.vcm/plugin.xml.off
deleted file mode 100644
index 09d244e..0000000
--- a/org.eclipse.jdt.ui.vcm/plugin.xml.off
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- ======================================================================= -->
-<!-- This plugin provides basic VCM functionality to the Eclipse Java UI -->
-<!-- ======================================================================= -->
-<plugin
- name="%pluginName"
- id = "org.eclipse.jdt.ui.vcm"
- version = "1.0"
- provider-name = "Object Technology International, Inc.">
-
- <requires>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.vcm.core"/>
- <import plugin="org.eclipse.vcm.ui"/>
- <import plugin="org.eclipse.vcm.ui.cvs"/>
- <import plugin="org.eclipse.jdt.ui"/>
- <import plugin="org.eclipse.jdt.core"/>
- </requires>
-
-<runtime>
- <library name="jdtvcm.jar">
- <export name = "*"/>
- </library>
-</runtime>
-
-<extension point="org.eclipse.vcm.core.ignore">
- <ignore pattern = "*.class" selected = "true"/>
-</extension>
-
-<!-- **************** View Actions ******************* -->
-<extension point="org.eclipse.ui.viewActions">
- <viewContribution
- id="org.eclipse.vcm.packageViewContribution"
- targetID="org.eclipse.jdt.ui.PackageExplorer">
- <action id="org.eclipse.vcm.vcminfoinpkg"
- label="%TogglePackagesViewVersionLabels.label"
- menubarPath="additions"
- state="false"
- tooltip="%TogglePackagesViewVersionLabels.tooltip"
- class="org.eclipse.jdt.ui.vcm.TogglePackageViewVersionLabels">
- </action>
- </viewContribution>
-</extension>
-
-</plugin>
\ No newline at end of file
diff --git a/org.eclipse.jdt.ui.vcm/scripts/exportplugin.xml b/org.eclipse.jdt.ui.vcm/scripts/exportplugin.xml
deleted file mode 100644
index 35d3ba3..0000000
--- a/org.eclipse.jdt.ui.vcm/scripts/exportplugin.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<!-- build script to create a plugin from org.eclipse.jdt.ui.vcm -->
-<project name="org.eclipse.jdt.ui.vcm" default="export" basedir="..">
- <target name="init">
- <tstamp/>
- <property name="destdir" value="../../plugin-export" />
- <property name="plugin" value="org.eclipse.jdt.ui.vcm" />
- <property name="dest" value="${destdir}/${plugin}" />
- </target>
-
- <target name="build" depends="init">
- <eclipse.incrementalBuild project="${plugin}" kind="incr"/>
- </target>
-
- <target name="export" depends="build">
- <mkdir dir="${destdir}" />
- <delete dir="${dest}" />
- <mkdir dir="${dest}" />
- <jar
- jarfile="${dest}/jdtvcm.jar"
- basedir="bin"
- />
- <copy file="plugin.xml.off" todir="${dest}"/>
- <copy file="plugin.properties" todir="${dest}"/>
- <zip zipfile="${dest}/jdtvcmsrc.zip">
- <fileset dir="vcm" />
- </zip>
- </target>
-</project>
diff --git a/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/flow/FlowAnalyzer.java b/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/flow/FlowAnalyzer.java
index 7a056d5..d46f004 100644
--- a/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/flow/FlowAnalyzer.java
+++ b/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/flow/FlowAnalyzer.java
@@ -352,22 +352,6 @@
switchFlowInfo.removeLabel(null);
}
- //---- Helper to find correct variable binding --------------------------
-
- private static IVariableBinding getVariableBinding(Expression reference) {
- if (reference == null)
- return null;
- if (!(reference instanceof Name))
- return null;
- IBinding binding= ((Name)reference).resolveBinding();
- if (!(binding instanceof IVariableBinding))
- return null;
- IVariableBinding result= (IVariableBinding)binding;
- if (result.isField())
- return null;
- return result;
- }
-
//---- concret endVisit methods ---------------------------------------------------
public void endVisit(AnonymousClassDeclaration node) {
@@ -418,11 +402,11 @@
FlowInfo lhs= getFlowInfo(node.getLeftHandSide());
FlowInfo rhs= getFlowInfo(node.getRightHandSide());
if (lhs instanceof LocalFlowInfo) {
- ((LocalFlowInfo)lhs).setWriteAccess(fFlowContext);
+ LocalFlowInfo llhs= (LocalFlowInfo)lhs;
+ llhs.setWriteAccess(fFlowContext);
if (node.getOperator() != Assignment.Operator.ASSIGN) {
GenericSequentialFlowInfo tmp= createSequential();
- IVariableBinding binding= getVariableBinding(node.getLeftHandSide());
- tmp.merge(new LocalFlowInfo(binding, FlowInfo.READ, fFlowContext), fFlowContext);
+ tmp.merge(new LocalFlowInfo(llhs, FlowInfo.READ, fFlowContext), fFlowContext);
tmp.merge(rhs, fFlowContext);
rhs= tmp;
}
@@ -842,7 +826,7 @@
GenericSequentialFlowInfo result= createSequential(node);
result.merge(info, fFlowContext);
result.merge(
- new LocalFlowInfo(getVariableBinding(operand), FlowInfo.WRITE, fFlowContext),
+ new LocalFlowInfo((LocalFlowInfo)info, FlowInfo.WRITE, fFlowContext),
fFlowContext);
} else {
setFlowInfo(node, info);
diff --git a/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/flow/LocalFlowInfo.java b/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/flow/LocalFlowInfo.java
index eba72c7..b7ac0bc 100644
--- a/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/flow/LocalFlowInfo.java
+++ b/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/flow/LocalFlowInfo.java
@@ -26,6 +26,15 @@
}
}
+ public LocalFlowInfo(LocalFlowInfo info, int localAccessMode, FlowContext context) {
+ super(NO_RETURN);
+ fVariableId= info.fVariableId;
+ if (context.considerAccessMode()) {
+ createAccessModeArray(context);
+ fAccessModes[fVariableId - context.getStartingIndex()]= localAccessMode;
+ }
+ }
+
public void setWriteAccess(FlowContext context) {
if (context.considerAccessMode()) {
fAccessModes[fVariableId - context.getStartingIndex()]= FlowInfo.WRITE;
diff --git a/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/MoveCuUpdateCreator.java b/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/MoveCuUpdateCreator.java
index fb1c896..c6394db 100644
--- a/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/MoveCuUpdateCreator.java
+++ b/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/MoveCuUpdateCreator.java
@@ -223,7 +223,9 @@
}
}
- private boolean addImport(boolean force, IPackageFragment pack, ICompilationUnit cu) throws JavaModelException {
+ private boolean addImport(boolean force, IPackageFragment pack, ICompilationUnit cu) throws JavaModelException {
+ if (pack.isDefaultPackage())
+ return false;
if (cu.getImport(pack.getElementName() + ".*").exists()) //$NON-NLS-1$
return false;
diff --git a/org.eclipse.jdt.ui/plugin.xml b/org.eclipse.jdt.ui/plugin.xml
index 2a55bc3..7accb3d 100644
--- a/org.eclipse.jdt.ui/plugin.xml
+++ b/org.eclipse.jdt.ui/plugin.xml
@@ -3,7 +3,7 @@
<plugin
name="%pluginName"
id = "org.eclipse.jdt.ui"
- version = "2.1.0"
+ version = "2.1.1"
provider-name = "%providerName"
class="org.eclipse.jdt.internal.ui.JavaPlugin">
diff --git a/org.eclipse.jdt.ui/scripts/exportplugin.xml b/org.eclipse.jdt.ui/scripts/exportplugin.xml
index 034d834..e9f608f 100644
--- a/org.eclipse.jdt.ui/scripts/exportplugin.xml
+++ b/org.eclipse.jdt.ui/scripts/exportplugin.xml
@@ -5,7 +5,7 @@
<tstamp/>
<property name="destdir" value="../../plugin-export" />
<property name="plugin" value="org.eclipse.jdt.ui" />
- <property name="version" value="_2.1.0" />
+ <property name="version" value="_2.1.1" />
<property name="dest" value="${destdir}/${plugin}${version}" />
</target>
diff --git a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/PullUpInputPage1.java b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/PullUpInputPage1.java
index f004727..f350ce7 100644
--- a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/PullUpInputPage1.java
+++ b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/PullUpInputPage1.java
@@ -116,6 +116,8 @@
mac= (MemberActionInfo)((Item)element).getData();
} else
mac= (MemberActionInfo)element;
+ if (! canModify(mac, property))//workaround for 37266 (which resulted in jdt ui bug 34926)
+ return;
Assert.isTrue(mac.isMethodInfo());
mac.setAction(action);
PullUpInputPage1.this.updateUIElements(null);
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPlugin.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPlugin.java
index f2c9b6c..d9f8844 100644
--- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPlugin.java
+++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPlugin.java
@@ -238,11 +238,11 @@
* preference store to let older versions access it. Since 2.1 the
* Java editor font is managed by the workbench font preference page.
*/
- PreferenceConverter.putValue(getPreferenceStore(), JFaceResources.TEXT_FONT, JFaceResources.getFont(PreferenceConstants.EDITOR_TEXT_FONT).getFontData());
+ PreferenceConverter.putValue(getPreferenceStore(), JFaceResources.TEXT_FONT, JFaceResources.getFontRegistry().getFontData(PreferenceConstants.EDITOR_TEXT_FONT));
fFontPropertyChangeListener= new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
if (PreferenceConstants.EDITOR_TEXT_FONT.equals(event.getProperty()))
- PreferenceConverter.putValue(getPreferenceStore(), JFaceResources.TEXT_FONT, JFaceResources.getFont(PreferenceConstants.EDITOR_TEXT_FONT).getFontData());
+ PreferenceConverter.putValue(getPreferenceStore(), JFaceResources.TEXT_FONT, JFaceResources.getFontRegistry().getFontData(PreferenceConstants.EDITOR_TEXT_FONT));
}
};
JFaceResources.getFontRegistry().addListener(fFontPropertyChangeListener);
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/TopLevelTypeProblemsLabelDecorator.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/TopLevelTypeProblemsLabelDecorator.java
index a949278..b892baa 100644
--- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/TopLevelTypeProblemsLabelDecorator.java
+++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/TopLevelTypeProblemsLabelDecorator.java
@@ -46,13 +46,21 @@
ICompilationUnit cu= ((IType)sourceElement).getCompilationUnit();
if (cu == null)
return false;
- IType[] types= cu.getAllTypes();
+ IType[] types= cu.getTypes();
if (types.length < 1)
return false;
+
+ int firstTypeStartOffset= -1;
ISourceRange range= types[0].getSourceRange();
- if (range == null)
- return false;
- return pos < range.getOffset() || isInside(pos, cu.getSourceRange());
+ if (range != null)
+ firstTypeStartOffset= range.getOffset();
+
+ int lastTypeEndOffset= -1;
+ range= types[types.length-1].getSourceRange();
+ if (range != null)
+ lastTypeEndOffset= range.getOffset() + range.getLength() - 1;
+
+ return pos < firstTypeStartOffset || pos > lastTypeEndOffset || isInside(pos, sourceElement.getSourceRange());
}
private boolean isInside(int pos, ISourceRange range) {
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
index e1fb9e7..d257997 100644
--- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
+++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
@@ -638,8 +638,8 @@
private void handleSelectionChanged(SelectionChangedEvent event) {
IStructuredSelection selection= (IStructuredSelection) event.getSelection();
fActionSet.handleSelectionChanged(event);
- // if (OpenStrategy.getOpenMethod() != OpenStrategy.SINGLE_CLICK)
- linkToEditor(selection);
+ if (isLinkingEnabled())
+ linkToEditor(selection);
}
public void selectReveal(ISelection selection) {
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/ClassPathDetector.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/ClassPathDetector.java
index 5e4cea9..188024c 100644
--- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/ClassPathDetector.java
+++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/ClassPathDetector.java
@@ -24,6 +24,7 @@
import org.eclipse.core.resources.IResourceProxyVisitor;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.jdt.core.IClasspathEntry;
@@ -32,7 +33,6 @@
import org.eclipse.jdt.core.JavaConventions;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.Signature;
import org.eclipse.jdt.core.ToolFactory;
import org.eclipse.jdt.core.compiler.CharOperation;
import org.eclipse.jdt.core.util.IClassFileReader;
@@ -255,18 +255,25 @@
return null;
}
+ private boolean hasExtension(String name, String ext) {
+ return name.endsWith(ext) && (ext.length() != name.length());
+ }
+
+ private boolean isValidCUName(String name) {
+ return !JavaConventions.validateCompilationUnitName(name).matches(IStatus.ERROR);
+ }
+
/* (non-Javadoc)
* @see org.eclipse.core.resources.IResourceProxyVisitor#visit(org.eclipse.core.resources.IResourceProxy)
*/
public boolean visit(IResourceProxy proxy) throws CoreException {
if (proxy.getType() == IResource.FILE) {
String name= proxy.getName();
- String extension= Signature.getSimpleName(name);
- if ("java".equalsIgnoreCase(extension)) { //$NON-NLS-1$
+ if (hasExtension(name, ".java") && isValidCUName(name)) { //$NON-NLS-1$
visitCompilationUnit((IFile) proxy.requestResource());
- } else if ("class".equalsIgnoreCase(extension)) { //$NON-NLS-1$
+ } else if (hasExtension(name, ".class")) { //$NON-NLS-1$
fClassFiles.add((IFile) proxy.requestResource());
- } else if ("jar".equalsIgnoreCase(extension)) { //$NON-NLS-1$
+ } else if (hasExtension(name, ".jar")) { //$NON-NLS-1$
fJARFiles.add(proxy.requestFullPath());
}
return false;
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/NewVariableEntryDialog.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/NewVariableEntryDialog.java
index f822d23..5009d9f 100644
--- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/NewVariableEntryDialog.java
+++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/NewVariableEntryDialog.java
@@ -95,7 +95,7 @@
super(parent);
int shellStyle= getShellStyle();
setShellStyle(shellStyle | SWT.MAX | SWT.RESIZE);
-
+ updateStatus(new StatusInfo(StatusInfo.ERROR, "")); //$NON-NLS-1$
String[] buttonLabels= new String[] {
/* IDX_EXTEND */ NewWizardMessages.getString("NewVariableEntryDialog.vars.extend"), //$NON-NLS-1$
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/StandardJavaElementContentProvider.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/StandardJavaElementContentProvider.java
index cd2b73f..89dc046 100644
--- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/StandardJavaElementContentProvider.java
+++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/StandardJavaElementContentProvider.java
@@ -311,11 +311,17 @@
List nonJavaResources= new ArrayList();
for (int i= 0; i < members.length; i++) {
Object o= members[i];
- // http://bugs.eclipse.org/bugs/show_bug.cgi?id=31374
+ // A folder can also be a package fragement root in the following case
+ // Project
+ // + src <- source folder
+ // + excluded <- excluded from class path
+ // + included <- a new source folder.
+ // Included is a member of excluded, but since it is rendered as a source
+ // folder we have to exclude it as a normal child.
if (o instanceof IFolder) {
- IJavaProject jProject= JavaCore.create(((IFolder)o).getProject());
- if (jProject != null && jProject.exists() && jProject.isOnClasspath(folder)) {
- continue;
+ IJavaElement element= JavaCore.create((IFolder)o);
+ if (element instanceof IPackageFragmentRoot && element.exists()) {
+ continue;
}
}
nonJavaResources.add(o);
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewPackageWizardPage.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewPackageWizardPage.java
index 0b2c585..0965fe1 100644
--- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewPackageWizardPage.java
+++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewPackageWizardPage.java
@@ -220,7 +220,7 @@
}
IPackageFragmentRoot root= getPackageFragmentRoot();
- if (root != null) {
+ if (root != null && root.getJavaProject().exists()) {
IPackageFragment pack= root.getPackageFragment(packName);
try {
IPath rootPath= root.getPath();
diff --git a/org.junit/.classpath b/org.junit/.classpath
deleted file mode 100644
index e0b26de..0000000
--- a/org.junit/.classpath
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry exported="true" kind="lib" path="junit.jar" sourcepath="/org.junit/junitsrc.zip"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path=""/>
-</classpath>
diff --git a/org.junit/.project b/org.junit/.project
deleted file mode 100644
index 29a06e7..0000000
--- a/org.junit/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.junit</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/org.junit/about.html b/org.junit/about.html
deleted file mode 100644
index 7cb2db3..0000000
--- a/org.junit/about.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>25th February, 2003</p>
-<h3>License</h3>
-<p>Eclipse.org makes available all content in this plug-in ("Content"). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-Common Public License Version 1.0 ("CPL"). A copy of the CPL is available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>.
-For purposes of the CPL, "Program" will mean the Content.</p>
-
-<h3>Third Party Content</h3>
-
-<p>The Content includes items that have been sourced from third parties as follows:</p>
-
-<p><b>JUnit 3.8.1</b></p>
-
-<p>The plug-in is accompanied by software developed by JUnit.org. The JUnit 3.8.1 code included with the plug-in includes no modifications.
-Your use of JUnit 3.8.1 in both source and binary code form contained in the plug-in is subject to the terms and conditions of the IBM Public License 1.0
-which is available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>.
-The binary code is located in junit.jar and the source code is located in src.jar.</p>
-
-<p>i) IBM effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;</p>
-
-<p>ii) IBM effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;</p>
-
-<p>iii) IBM states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party.</p>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise
-made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such
-Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the CPL ("Other License"), any modifications, enhancements and/or
-other code and/or documentation ("Modifications") uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the
-host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of
-the CPL.</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/org.junit/build.properties b/org.junit/build.properties
deleted file mode 100644
index c308cec..0000000
--- a/org.junit/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = plugin.xml,\
- about.html,\
- plugin.properties,\
- junit.jar
-
-src.includes = *.zip,about.html
-
-
diff --git a/org.junit/junit.jar b/org.junit/junit.jar
deleted file mode 100644
index 674d71e..0000000
--- a/org.junit/junit.jar
+++ /dev/null
Binary files differ
diff --git a/org.junit/junitsrc.zip b/org.junit/junitsrc.zip
deleted file mode 100644
index 8804909..0000000
--- a/org.junit/junitsrc.zip
+++ /dev/null
Binary files differ
diff --git a/org.junit/plugin.properties b/org.junit/plugin.properties
deleted file mode 100644
index 7e995ae..0000000
--- a/org.junit/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-pluginName=JUnit Testing Framework
-providerName=Eclipse.org
diff --git a/org.junit/plugin.xml b/org.junit/plugin.xml
deleted file mode 100644
index c2958b0..0000000
--- a/org.junit/plugin.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin
- name="%pluginName"
- id="org.junit"
- version="3.8.1"
- provider-name="%providerName">
-
- <runtime>
- <library name="junit.jar">
- <export name="*"/>
- <packages prefixes="junit"/>
- </library>
- </runtime>
-</plugin>
diff --git a/org.junit/scripts/exportplugin.xml b/org.junit/scripts/exportplugin.xml
deleted file mode 100644
index 5574c67..0000000
--- a/org.junit/scripts/exportplugin.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<!-- build script to create JUnit Plugin -->
-<project name="org.junit" default="export" basedir="..">
- <target name="init">
- <tstamp/>
- <property name="destdir" value="../../plugin-export" />
- <property name="plugin" value="org.junit" />
- <property name="dest" value="${destdir}/${plugin}" />
- </target>
-
- <target name="build" depends="init">
- <eclipse.incrementalBuild project="${plugin}" kind="incr"/>
- </target>
-
- <target name="export" depends="build">
- <mkdir dir="${destdir}" />
- <delete dir="${dest}" />
- <mkdir dir="${dest}" />
-
- <copy file="junit.jar" todir="${dest}"/>
- <copy file="junitsrc.zip" todir="${dest}"/>
- <copy file="plugin.xml" todir="${dest}"/>
- <copy file="about.html" todir="${dest}"/>
- <copy file="plugin.properties" todir="${dest}"/>
-
- </target>
-</project>