Skip to main content



      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 11:16 Go to next message
Eclipse UserFriend
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 06:04 Go to previous messageGo to next message
Eclipse UserFriend
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 05:18 Go to previous messageGo to next message
Eclipse UserFriend
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 05:22 Go to previous message
Eclipse UserFriend
Here is an another hint:

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

[Updated on: Tue, 16 August 2011 05:22] by 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: Tue Jul 15 19:52:19 EDT 2025

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

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

Back to the top