Пример #1
0
 @Override
 public MindPathEntry addMindPathImportPackageFromFile(MindFile file) {
   MindPathEntry mpe = MindIdeCore.newMPEImport(file.getQualifiedName());
   if (getMindpathentries().contains(mpe)) return null;
   getMindpathentries().add(mpe);
   return mpe;
 }
Пример #2
0
  @Override
  public MindPathEntry addMindPathProjectReferenceFromFile(MindFile file) {
    MindLibOrProject fileProject =
        file.getPackage() == null
            ? null
            : file.getPackage().getRootsrc() == null
                ? null
                : file.getPackage().getRootsrc().getProject();
    if (fileProject == null || fileProject == this) return null;
    if (fileProject instanceof MindLibrary) return null;

    IProject eclipseProject = ((MindProject) fileProject).getProject();
    if (eclipseProject == null) return null;
    MindPathEntry mpe = MindIdeCore.newMPEProject(eclipseProject);
    if (getMindpathentries().contains(mpe)) return null;
    getMindpathentries().add(mpe);
    return mpe;
  }