Accessing Project Delta's [message #169692] |
Fri, 12 December 2003 10:23 |
Eclipse User |
|
|
|
Originally posted by: sppatel.us.ibm.com
This is a multipart message in MIME format.
--=_alternative 0054D0AA85256DFA_=
Content-Type: text/plain; charset="US-ASCII"
I reworded my last posting to be clearer...
I cannot find a way to do the following...
I have an incremental project builder for which I need to in its build
method to determine if a delta exists for another project in the
workspace. If I call getDelta(AnotherProject) it returns null even though
a delta exists because it passes through the !isInterestedIn() method. I
know in the build method I can return an array of other projects but this
will not work for my situation, I need to predetermine this for a list of
projects so I can take the neccessary action in the build method for the
original project.
So in my build method I want this behavior
protected IProject[] build(.....) {
IProject anotherProject =
ResourcesPlugin.getWorkspace.getRoot().getProject("AnotherProject ");
if(getDelta(anotherProject) == null) {
//process corrent project
getProject().accept(this);
} else {
//do something else
}
return null;
}
Is there a way I can do this? I really don't need to know what the deltas
are, just if one exists.
--=_alternative 0054D0AA85256DFA_=
Content-Type: text/html; charset="US-ASCII"
<br><font size=2 face="sans-serif">I reworded my last posting to be clearer...</font>
<br>
<br><font size=2 face="sans-serif">I cannot find a way to do the following...</font>
<br>
<br><font size=2 face="sans-serif">I have an incremental project builder
for which I need to in its build method to determine if a delta exists
for another project in the workspace. If I call getDelta(AnotherProject)
it returns null even though a delta exists because it passes through the
!isInterestedIn() method. I know in the build method I can return
an array of other projects but this will not work for my situation, I need
to predetermine this for a list of projects so I can take the neccessary
action in the build method for the original project.</font>
<br>
<br><font size=2 face="sans-serif">So in my build method I want this behavior</font>
<br>
<br><font size=2 face="sans-serif">protected IProject[] build(.....)
{</font>
<br>
<br><font size=2 face="sans-serif"> IProject
anotherProject = ResourcesPlugin.getWorkspace.getRoot().getProject(" AnotherProject"); </font>
<br>
<br><font size=2 face="sans-serif"> if(getDelta(anotherProject)
== null) {</font>
<br><font size=2 face="sans-serif">
//process corrent project</font>
<br><font size=2 face="sans-serif">
getProject().accept(this);</font>
<br><font size=2 face="sans-serif"> }
else {</font>
<br><font size=2 face="sans-serif">
//do something else</font>
<br><font size=2 face="sans-serif"> }</font>
<br>
<br><font size=2 face="sans-serif">return null;</font>
<br><font size=2 face="sans-serif">}</font>
<br>
<br><font size=2 face="sans-serif">Is there a way I can do this? I
really don't need to know what the deltas are, just if one exists. </font>
--=_alternative 0054D0AA85256DFA_=--
|
|
|
Powered by
FUDForum. Page generated in 0.02799 seconds