Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » F_PRIMARY_WORKING_COPY: should this flag be set when opening the editor?
F_PRIMARY_WORKING_COPY: should this flag be set when opening the editor? [message #254398] Mon, 30 June 2008 15:16 Go to next message
Jonas Zuberbuehler is currently offline Jonas ZuberbuehlerFriend
Messages: 21
Registered: July 2009
Junior Member
Hello

I need to extract fine grained source code changes (i.e. method body
changes) for what I use IElementChangedListener. Since for method body
changes the provided IJavaElementDelta contains the hole ICompilationUnit
I'm trying to adapt the approach described in "How to compute fine grained
JavaElementDelta if Compilation Unit has only not-structural changes?".

In short the compilation unit is stored as soon as it is opened (old
version) and future changes are extracted by comparing the old with the
new version. To get notified as soon as a compilation unit is opened the
IJavaElementDelta should be flagged with F_PRIMARY_WORKING_COPY according
to the mentioned approach. That's where I am stuck: the condition of

if ((delta.getFlags() & IJavaElementDelta.F_PRIMARY_WORKING_COPY) != 0) {
...
}

never evaluates to true.

Am I missing something?

Thanks for your help!

cheers
jonas
Re: F_PRIMARY_WORKING_COPY: should this flag be set when opening the editor? [message #254495 is a reply to message #254398] Wed, 02 July 2008 10:04 Go to previous messageGo to next message
Jonas Zuberbuehler is currently offline Jonas ZuberbuehlerFriend
Messages: 21
Registered: July 2009
Junior Member
Can anybody help?

What I'm trying to is to get notified as soon as a java file gets opened
by the java editor. Is there another way than registering myself as an
IElementChangedListener?
Re: F_PRIMARY_WORKING_COPY: should this flag be set when opening the editor? [message #716038 is a reply to message #254495] Tue, 16 August 2011 09:18 Go to previous messageGo to next message
public is currently offline publicFriend
Messages: 9
Registered: September 2010
Junior Member
Here is my similiar question:
www.eclipse.org/forums/index.php/m/716037/#msg_716037
Re: F_PRIMARY_WORKING_COPY: should this flag be set when opening the editor? [message #716039 is a reply to message #716038] Tue, 16 August 2011 09:22 Go to previous message
public is currently offline publicFriend
Messages: 9
Registered: September 2010
Junior Member
Here is an another hint:

bugs.eclipse.org/bugs/show_bug.cgi?id=40028

[Updated on: Tue, 16 August 2011 09:22]

Report message to a moderator

Previous Topic:How to apply change to source code?
Next Topic:Eclipse Indigo For Mac os x - Crash when opening
Goto Forum:
  


Current Time: Fri Feb 07 09:23:29 GMT 2025

Powered by FUDForum. Page generated in 0.02990 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top