@@ -118,10 +118,14 @@ public boolean visit(IResourceDelta delta) throws CoreException {
118118 if (kind == IResourceDelta .ADDED || kind == IResourceDelta .REMOVED ) {
119119 type = MANIFEST | EXTENSIONS | BUILD | STRUCTURE ;
120120 if (PDECore .DEBUG_VALIDATION ) {
121- System .out .print ("Needs to rebuild project [" + getProject ().getName () + "]: " ); //$NON-NLS-1$ //$NON-NLS-2$
122- System .out .print (delta .getResource ().getProjectRelativePath ().toString ());
123- System .out .print (" - " ); //$NON-NLS-1$
124- System .out .println (kind == IResourceDelta .ADDED ? "added" : "removed" ); //$NON-NLS-1$ //$NON-NLS-2$
121+ StringBuilder sb = new StringBuilder ();
122+ sb .append ("Needs to rebuild project [" ); //$NON-NLS-1$
123+ sb .append (getProject ().getName ());
124+ sb .append ("]: " ); //$NON-NLS-1$
125+ sb .append (delta .getResource ().getProjectRelativePath ().toString ());
126+ sb .append (" - " ); //$NON-NLS-1$
127+ sb .append (kind == IResourceDelta .ADDED ? "added" : "removed" ); //$NON-NLS-1$ //$NON-NLS-2$
128+ PDECore .TRACE .trace (PDECore .KEY_DEBUG_VALIDATION , sb .toString ());
125129 }
126130 return false ;
127131 }
@@ -137,30 +141,46 @@ public boolean visit(IResourceDelta delta) throws CoreException {
137141 if (isLocalizationFile (resource )) {
138142 type |= MANIFEST | EXTENSIONS ;
139143 if (PDECore .DEBUG_VALIDATION ) {
140- System .out .print ("Needs to rebuild manifest and extensions in project [" + getProject ().getName () + "]: " ); //$NON-NLS-1$ //$NON-NLS-2$
141- System .out .print (delta .getResource ().getProjectRelativePath ().toString ());
142- System .out .println (" - changed" ); //$NON-NLS-1$
144+ StringBuilder sb = new StringBuilder ();
145+ sb .append ("Needs to rebuild manifest and extensions in project [" ); //$NON-NLS-1$
146+ sb .append (getProject ().getName ());
147+ sb .append ("]: " ); //$NON-NLS-1$
148+ sb .append (delta .getResource ().getProjectRelativePath ().toString ());
149+ sb .append (" - changed" ); //$NON-NLS-1$
150+ PDECore .TRACE .trace (PDECore .KEY_DEBUG_VALIDATION , sb .toString ());
143151 }
144152 } else if (file .equals (PDEProject .getManifest (project ))) {
145153 type |= MANIFEST | EXTENSIONS | BUILD ;
146154 if (PDECore .DEBUG_VALIDATION ) {
147- System .out .print ("Needs to rebuild project [" + getProject ().getName () + "]: " ); //$NON-NLS-1$ //$NON-NLS-2$
148- System .out .print (delta .getResource ().getProjectRelativePath ().toString ());
149- System .out .println (" - changed" ); //$NON-NLS-1$
155+ StringBuilder sb = new StringBuilder ();
156+ sb .append ("Needs to rebuild project [" ); //$NON-NLS-1$
157+ sb .append (getProject ().getName ());
158+ sb .append ("]: " ); //$NON-NLS-1$
159+ sb .append (delta .getResource ().getProjectRelativePath ().toString ());
160+ sb .append (" - changed" ); //$NON-NLS-1$
161+ PDECore .TRACE .trace (PDECore .KEY_DEBUG_VALIDATION , sb .toString ());
150162 }
151163 } else if (name .endsWith (".exsd" ) || file .equals (PDEProject .getPluginXml (project )) || file .equals (PDEProject .getFragmentXml (project ))) { //$NON-NLS-1$
152164 type |= EXTENSIONS | BUILD ;
153165 if (PDECore .DEBUG_VALIDATION ) {
154- System .out .print ("Needs to rebuild project [" + getProject ().getName () + "]: " ); //$NON-NLS-1$ //$NON-NLS-2$
155- System .out .print (delta .getResource ().getProjectRelativePath ().toString ());
156- System .out .println (" - changed" ); //$NON-NLS-1$
166+ StringBuilder sb = new StringBuilder ();
167+ sb .append ("Needs to rebuild project [" ); //$NON-NLS-1$
168+ sb .append (getProject ().getName ());
169+ sb .append ("]: " ); //$NON-NLS-1$
170+ sb .append (delta .getResource ().getProjectRelativePath ().toString ());
171+ sb .append (" - changed" ); //$NON-NLS-1$
172+ PDECore .TRACE .trace (PDECore .KEY_DEBUG_VALIDATION , sb .toString ());
157173 }
158174 } else if (file .equals (PDEProject .getBuildProperties (project ))) {
159175 type |= BUILD ;
160176 if (PDECore .DEBUG_VALIDATION ) {
161- System .out .print ("Needs to rebuild build.properties in project [" + getProject ().getName () + "]: " ); //$NON-NLS-1$ //$NON-NLS-2$
162- System .out .print (delta .getResource ().getProjectRelativePath ().toString ());
163- System .out .println (" - changed" ); //$NON-NLS-1$
177+ StringBuilder sb = new StringBuilder ();
178+ sb .append ("Needs to rebuild build.properties in project [" ); //$NON-NLS-1$
179+ sb .append (getProject ().getName ());
180+ sb .append ("]: " ); //$NON-NLS-1$
181+ sb .append (delta .getResource ().getProjectRelativePath ().toString ());
182+ sb .append (" - changed" ); //$NON-NLS-1$
183+ PDECore .TRACE .trace (PDECore .KEY_DEBUG_VALIDATION , sb .toString ());
164184 }
165185 }
166186 }
@@ -203,7 +223,8 @@ private int getDeltaType(IProject project) throws CoreException {
203223 // always do a build of the project if a full build or an unspecified change has occurred
204224 if (delta == null ) {
205225 if (PDECore .DEBUG_VALIDATION ) {
206- System .out .println ("Project [" + getProject ().getName () + "] - full build" ); //$NON-NLS-1$ //$NON-NLS-2$
226+ PDECore .TRACE .trace (PDECore .KEY_DEBUG_VALIDATION ,
227+ "Project [" + getProject ().getName () + "] - full build" ); //$NON-NLS-1$ //$NON-NLS-2$
207228 }
208229 return MANIFEST | EXTENSIONS | BUILD | STRUCTURE ;
209230 }
@@ -214,7 +235,8 @@ private int getDeltaType(IProject project) throws CoreException {
214235 if (Boolean .TRUE .equals (project .getSessionProperty (PDECore .TOUCH_PROJECT ))) {
215236 project .setSessionProperty (PDECore .TOUCH_PROJECT , null );
216237 if (PDECore .DEBUG_VALIDATION ) {
217- System .out .println ("Dependencies Changed: Project [" + getProject ().getName () + "] - full build" ); //$NON-NLS-1$ //$NON-NLS-2$
238+ PDECore .TRACE .trace (PDECore .KEY_DEBUG_VALIDATION ,
239+ "Dependencies Changed: Project [" + getProject ().getName () + "] - full build" ); //$NON-NLS-1$ //$NON-NLS-2$
218240 }
219241 return MANIFEST | EXTENSIONS | BUILD ;
220242 }
@@ -238,7 +260,9 @@ private int getDeltaType(IProject project) throws CoreException {
238260 if (fClassFileVisitor .hasChanged ()) {
239261 type |= MANIFEST | EXTENSIONS | BUILD ;
240262 if (PDECore .DEBUG_VALIDATION ) {
241- System .out .println ("Class files changed due to dependency changes: Project [" + getProject ().getName () + "] - rebuild manifest and properties files" ); //$NON-NLS-1$ //$NON-NLS-2$
263+ PDECore .TRACE .trace (PDECore .KEY_DEBUG_VALIDATION ,
264+ "Class files changed due to dependency changes: Project [" + getProject ().getName () //$NON-NLS-1$
265+ + "] - rebuild manifest and properties files" ); //$NON-NLS-1$
242266 }
243267 }
244268 }
0 commit comments