Changeset 3516 for devel-tools
- Timestamp:
- Mar 14, 2008, 9:44:16 AM (13 years ago)
- Location:
- devel-tools/trunk/eclipse/org.refal.rfpdt.core
- Files:
-
- 1 deleted
- 4 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
devel-tools/trunk/eclipse/org.refal.rfpdt.core/META-INF/MANIFEST.MF
r3508 r3516 4 4 Bundle-SymbolicName: org.refal.rfpdt.core;singleton:=true 5 5 Bundle-Version: 1.1.9 6 Bundle-Activator: org.refal.rfpdt.core.RfpCore Plugin6 Bundle-Activator: org.refal.rfpdt.core.RfpCore 7 7 Bundle-Vendor: Program Systems Institute of RAS 8 8 Require-Bundle: org.eclipse.core.resources, -
devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/core/RfpBuilder.java
r3511 r3516 51 51 private void makeClass (String className, byte[] bytes) { 52 52 IProject project = getProject(); 53 IJavaProject javaProject = RfpCore Plugin.getJavaProject(project);53 IJavaProject javaProject = RfpCore.getJavaProject(project); 54 54 try { 55 55 IPath projectPath = project.getFullPath(); … … 64 64 classFile.setDerived(true); 65 65 } catch (Exception e) { 66 RfpCore Plugin.log(e);66 RfpCore.log(e); 67 67 } 68 68 } … … 142 142 return new InputStreamReader(file.getContents(), file.getCharset()); 143 143 } catch (Exception e) { 144 RfpCore Plugin.log(e);144 RfpCore.log(e); 145 145 return null; 146 146 } … … 154 154 return new InputStreamReader(file.getContents(), file.getCharset()); 155 155 } catch (Exception e) { 156 RfpCore Plugin.log(e);156 RfpCore.log(e); 157 157 return null; 158 158 } … … 163 163 for (IClasspathEntry entry : getClasspathEntries(project)) 164 164 if (entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) { 165 IClasspathContainer container = JavaCore.getClasspathContainer(entry.getPath(), RfpCore Plugin165 IClasspathContainer container = JavaCore.getClasspathContainer(entry.getPath(), RfpCore 166 166 .getJavaProject(project)); 167 167 for (IClasspathEntry entry2 : container.getClasspathEntries()) { … … 178 178 } 179 179 } catch (Exception e) { 180 RfpCore Plugin.log(e);180 RfpCore.log(e); 181 181 } 182 182 return null; … … 199 199 } 200 200 201 public static final String BUILDER_ID = "org.refal.rfpdt.core.rfpbuilder"; 202 203 private static final QualifiedName IMPORTED_MODULES_PROPKEY = new QualifiedName(RfpCorePlugin.PLUGIN_ID, 201 private static final QualifiedName IMPORTED_MODULES_PROPKEY = new QualifiedName(RfpCore.PLUGIN_ID, 204 202 "imported_modules"); 205 206 private static final String MARKER_TYPE = "org.refal.rfpdt.core.rfpProblemMarker";207 203 208 204 private static boolean isRfFile (IResource resource) { … … 218 214 private static void addMarker (IFile file, String message, int lineNumber, int charStart, int charEnd, int severity) { 219 215 try { 220 IMarker marker = file.createMarker( MARKER_TYPE);216 IMarker marker = file.createMarker(RfpCore.MARKER_TYPE); 221 217 if (message == null) 222 218 message = "Error"; … … 255 251 protected void clean (IProgressMonitor monitor) throws CoreException { 256 252 IProject project = getProject(); 257 project.deleteMarkers( MARKER_TYPE, false, IResource.DEPTH_INFINITE);253 project.deleteMarkers(RfpCore.MARKER_TYPE, false, IResource.DEPTH_INFINITE); 258 254 259 255 project.accept(new IResourceVisitor() { … … 407 403 } 408 404 } catch (CoreException e) { 409 RfpCore Plugin.log(e);405 RfpCore.log(e); 410 406 } 411 407 } … … 413 409 private static void deleteMarkers (IFile file) { 414 410 try { 415 file.deleteMarkers( MARKER_TYPE, false, IResource.DEPTH_ZERO);411 file.deleteMarkers(RfpCore.MARKER_TYPE, false, IResource.DEPTH_ZERO); 416 412 } catch (CoreException e) { 417 RfpCore Plugin.log(e);413 RfpCore.log(e); 418 414 } 419 415 } … … 431 427 compileModules(modulesToRecompile, monitor); 432 428 } catch (CoreException e) { 433 RfpCore Plugin.log(e);429 RfpCore.log(e); 434 430 } 435 431 } … … 452 448 private static IClasspathEntry[] getClasspathEntries (IProject project) { 453 449 try { 454 return RfpCore Plugin.getJavaProject(project).getRawClasspath();450 return RfpCore.getJavaProject(project).getRawClasspath(); 455 451 } catch (Exception e) { 456 RfpCore Plugin.log(e);452 RfpCore.log(e); 457 453 return new IClasspathEntry[0]; 458 454 } -
devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/core/RfpCore.java
r3513 r3516 17 17 * The activator class controls the plug-in life cycle 18 18 */ 19 public class RfpCorePlugin extends Plugin { 19 public class RfpCore extends Plugin { 20 21 private static RfpCore plugin; 20 22 21 23 public static final String PLUGIN_ID = "org.refal.rfpdt"; 24 public static final String NATURE_ID = "org.refal.rfpdt.core.rfpnature"; 25 public static final String BUILDER_ID = "org.refal.rfpdt.core.rfpbuilder"; 26 public static final String MARKER_TYPE = "org.refal.rfpdt.core.rfpProblemMarker"; 27 public static final String RFP_CONTAINER = "org.refal.rfpdt.launching.RFP_CONTAINER"; 22 28 23 private static RfpCorePlugin plugin; 24 25 public RfpCorePlugin () { 29 public RfpCore () { 26 30 plugin = this; 27 31 } … … 51 55 * @return the shared instance 52 56 */ 53 public static RfpCore PlugingetDefault () {57 public static RfpCore getDefault () { 54 58 return plugin; 55 59 } … … 100 104 public static IJavaProject getJavaProject (IProject project) { 101 105 try { 102 if (project == null || !project.exists() || !project.hasNature(Rfp Nature.NATURE_ID))106 if (project == null || !project.exists() || !project.hasNature(RfpCore.NATURE_ID)) 103 107 return null; 104 108 } catch (CoreException e) { -
devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/core/RfpNature.java
r3511 r3516 12 12 import org.eclipse.jdt.core.JavaCore; 13 13 import org.eclipse.jdt.launching.JavaRuntime; 14 import org.refal.rfpdt.launching.RfpContainerInitializerAndResolver;15 14 16 15 public class RfpNature implements IProjectNature { 17 16 private static final String EXCLUSION_FILTER_ID = "org.eclipse.jdt.core.builder.resourceCopyExclusionFilter"; 18 17 private static final String EXCLUSION_EXTENTIONS = "*.rf,*.rfi"; 19 20 public static final String NATURE_ID = "org.refal.rfpdt.core.rfpnature";21 18 22 19 private IProject project; … … 26 23 ICommand[] commands = desc.getBuildSpec(); 27 24 for (int i = 0; i < commands.length; i++) 28 if (commands[i].getBuilderName().equals(Rfp Builder.BUILDER_ID))25 if (commands[i].getBuilderName().equals(RfpCore.BUILDER_ID)) 29 26 return; 30 27 ICommand[] newCommands = new ICommand[commands.length + 1]; 31 28 System.arraycopy(commands, 0, newCommands, 0, commands.length); 32 29 ICommand command = desc.newCommand(); 33 command.setBuilderName(Rfp Builder.BUILDER_ID);30 command.setBuilderName(RfpCore.BUILDER_ID); 34 31 newCommands[newCommands.length - 1] = command; 35 32 desc.setBuildSpec(newCommands); … … 37 34 38 35 { // setup the .classpath 39 IJavaProject javaProject = RfpCore Plugin.getJavaProject(project);36 IJavaProject javaProject = RfpCore.getJavaProject(project); 40 37 IClasspathEntry[] entriesOld = javaProject.getRawClasspath(); 41 38 IClasspathEntry[] entriesNew = new IClasspathEntry[entriesOld.length + 2]; … … 49 46 } 50 47 entriesNew[entriesOld.length + 0] = JavaCore.newContainerEntry(new Path( 51 RfpCo ntainerInitializerAndResolver.RFP_CONTAINER));48 RfpCore.RFP_CONTAINER)); 52 49 entriesNew[entriesOld.length + 1] = JavaCore.newContainerEntry(new Path(JavaRuntime.JRE_CONTAINER)); 53 50 javaProject.setRawClasspath(entriesNew, null); … … 67 64 ICommand[] commands = description.getBuildSpec(); 68 65 for (int i = 0; i < commands.length; i++) 69 if (commands[i].getBuilderName().equals(Rfp Builder.BUILDER_ID)) {66 if (commands[i].getBuilderName().equals(RfpCore.BUILDER_ID)) { 70 67 ICommand[] newCommands = new ICommand[commands.length - 1]; 71 68 System.arraycopy(commands, 0, newCommands, 0, i); -
devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/launching/RfpContainerInitializerAndResolver.java
r3508 r3516 20 20 import org.eclipse.jdt.launching.JavaRuntime; 21 21 import org.osgi.framework.Bundle; 22 import org.refal.rfpdt.core.RfpCore Plugin;22 import org.refal.rfpdt.core.RfpCore; 23 23 24 24 public class RfpContainerInitializerAndResolver extends ClasspathContainerInitializer implements … … 60 60 return new Path(file.substring(5, file.length() - 2)); 61 61 } catch (IOException e) { 62 RfpCore Plugin.log(e);62 RfpCore.log(e); 63 63 } 64 64 return null; 65 65 } 66 66 67 public static final String RFP_CONTAINER = "org.refal.rfpdt.launching.RFP_CONTAINER";68 69 67 @Override 70 68 public void initialize (IPath containerPath, IJavaProject project) throws CoreException { 71 if (containerPath.segmentCount() > 0 && containerPath.segment(0).equals(R FP_CONTAINER)) {69 if (containerPath.segmentCount() > 0 && containerPath.segment(0).equals(RfpCore.RFP_CONTAINER)) { 72 70 JavaCore.setClasspathContainer(containerPath, new IJavaProject[] { project }, 73 71 new IClasspathContainer[] { new RfpContainer(containerPath) }, null); 74 72 } else 75 RfpCore Plugin.log("Invalid RfpContainer path", IStatus.ERROR);73 RfpCore.log("Invalid RfpContainer path", IStatus.ERROR); 76 74 } 77 75
Note: See TracChangeset
for help on using the changeset viewer.