Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 208774 Details for
Bug 361279
[reconciling] JavaModel deltas (IJavaElementDelta) fail to be produced and reported to IElementChangedListener(s)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Testcase
Test-for-bug-361279.patch (text/plain), 2.28 KB, created by
Jay Arthanareeswaran
on 2011-12-23 07:15:17 EST
(
hide
)
Description:
Testcase
Filename:
MIME Type:
Creator:
Jay Arthanareeswaran
Created:
2011-12-23 07:15:17 EST
Size:
2.28 KB
patch
obsolete
>diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaElementDeltaTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaElementDeltaTests.java >index 2ddcd75..c23076f 100644 >--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaElementDeltaTests.java >+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaElementDeltaTests.java >@@ -34,7 +34,7 @@ > // All specified tests which do not belong to the class are skipped... > static { > // TESTS_PREFIX = "testBug100772_ProjectScope"; >-// TESTS_NAMES = new String[] { "testAddInvalidSubfolder" }; >+ TESTS_NAMES = new String[] { "testBug361279" }; > // TESTS_NUMBERS = new int[] { 100772 }; > // TESTS_RANGE = new int[] { 83304, -1 }; > } >@@ -3053,5 +3053,60 @@ > deleteProject("P"); > } > } >+public void testBug361279() throws Exception { >+ try { >+ createJavaProject("P", new String[] {""}, ""); >+ createFolder("P/x/y"); >+ createFile("P/x/y/A.java", >+ "package x.y;\n" + >+ "public class A {\n" + >+ "}"); >+ final ICompilationUnit cu = getCompilationUnit("P/x/y/A.java"); >+ final ICompilationUnit copy = cu.getWorkingCopy(null); >+ startDeltas(); >+ Runnable r = new Runnable(){ >+ public void run() { >+ try { >+ copy.getBuffer().setContents( >+ "package x.y;\n" + >+ "public class A {\n" + >+ " public void foo() {\n" + >+ " }\n" + >+ "}"); >+ copy.save(null, true); >+ } catch (Exception e) { >+ e.printStackTrace(); >+ } >+ } >+ }; >+ Runnable r2 = new Runnable(){ >+ public void run() { >+ try { >+ copy.getTypes()[0].createMethod("void bar() {}", null, true, null); >+ } catch (Exception e) { >+ e.printStackTrace(); >+ } >+ } >+ }; >+ Thread t = new Thread(r); >+ Thread t2 = new Thread(r2); >+ t.start(); >+ t2.start(); >+ >+ copy.commitWorkingCopy(true, null); >+ assertDeltas( >+ "Unexpected delta after commit", >+ "P[*]: {CHILDREN}\n" + >+ " <project root>[*]: {CHILDREN}\n" + >+ " x.y[*]: {CHILDREN}\n" + >+ " A.java[*]: {CHILDREN | FINE GRAINED | PRIMARY RESOURCE}\n" + >+ " A[*]: {CHILDREN | FINE GRAINED}\n" + >+ " bar()[+]: {}" >+ ); >+ } finally { >+ stopDeltas(); >+ deleteProject("P"); >+ } >+} > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 361279
: 208774 |
208850
|
208851
|
208852
|
208853
|
208854