當前位置: 首頁>>代碼示例>>Java>>正文


Java IProject.getName方法代碼示例

本文整理匯總了Java中org.eclipse.core.resources.IProject.getName方法的典型用法代碼示例。如果您正苦於以下問題:Java IProject.getName方法的具體用法?Java IProject.getName怎麽用?Java IProject.getName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.core.resources.IProject的用法示例。


在下文中一共展示了IProject.getName方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getOverwrittenShippedLibs

import org.eclipse.core.resources.IProject; //導入方法依賴的package包/類
private Set<String> getOverwrittenShippedLibs(Set<String> newNpmProjectNames) {
	Set<String> overwrittenShippedLibNames = new HashSet<>();
	Iterable<String> ps = ShippedCodeAccess.getAllShippedPaths();
	for (String shippedLibPath : ps) {
		URI uri = new File(shippedLibPath).toURI();
		Iterable<IProject> slProjects = externalLibraryWorkspace.getProjects(uri);

		for (IProject slProject : slProjects) {
			String slpName = slProject.getName();
			if (newNpmProjectNames.contains(slpName)) {
				overwrittenShippedLibNames.add(slpName);
			}
		}
	}
	return overwrittenShippedLibNames;
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:17,代碼來源:NpmManager.java

示例2: openJscriptTransactionEditor

import org.eclipse.core.resources.IProject; //導入方法依賴的package包/類
public void openJscriptTransactionEditor(IProject project) {
	Transaction transaction = (Transaction)this.getObject();
	
	String tempFileName = 	"_private/"+project.getName()+
							"__"+transaction.getConnector().getName()+
							"__"+transaction.getName();
	
	IFile file = project.getFile(tempFileName);

	IWorkbenchPage activePage = PlatformUI
									.getWorkbench()
									.getActiveWorkbenchWindow()
									.getActivePage();
	if (activePage != null) {
		try {
			activePage.openEditor(new JscriptTransactionEditorInput(file,transaction),
									"com.twinsoft.convertigo.eclipse.editors.jscript.JscriptTransactionEditor");
		} catch(PartInitException e) {
			ConvertigoPlugin.logException(e, "Error while loading the transaction editor '" + transaction.getName() + "'");
		} 
	}
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:23,代碼來源:TransactionTreeObject.java

示例3: getOrphanGraphWalkerClasses

import org.eclipse.core.resources.IProject; //導入方法依賴的package包/類
/**
 * @param projectName
 * @return
 */
public static List<IType> getOrphanGraphWalkerClasses(IType type, boolean hint) {
	try {
		IProject project = ResourceManager.getResource(type.getPath().toString()).getProject();
		String projectName = project.getName();

		List<IType> all = findClassesWithAnnotation(projectName, GraphWalker.class, "value", true);
		if (hint) {
			all = GraphWalkerFacade.getSharedContexts(project, type, all);
			all.remove(type);
		}

		Collections.sort(all, new Comparator() {
			@Override
			public int compare(Object o1, Object o2) {
				IType type1 = (IType) o1;
				IType type2 = (IType) o2;
				return type1.getFullyQualifiedName().compareTo(type2.getFullyQualifiedName());
			}
		});
		return all;
	} catch (Exception e) {
		ResourceManager.logException(e);
		return new ArrayList<IType>();
	}
}
 
開發者ID:gw4e,項目名稱:gw4e.project,代碼行數:30,代碼來源:JDTManager.java

示例4: getParameterFileIPath

import org.eclipse.core.resources.IProject; //導入方法依賴的package包/類
private IPath getParameterFileIPath(){
	if(getEditorInput() instanceof IFileEditorInput){
		IFileEditorInput input = (IFileEditorInput)getEditorInput() ;
		IFile file = input.getFile();
		IProject activeProject = file.getProject();
		String activeProjectName = activeProject.getName();

		IPath parameterFileIPath =new Path("/"+activeProjectName+"/param/"+ getPartName().replace(".job", ".properties"));
	    activeProjectName.concat("_").concat(getPartName().replace(".job", "_"));

		return parameterFileIPath;
	}else{
		return null;
	}

}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:17,代碼來源:ELTGraphicalEditor.java

示例5: removeProject

import org.eclipse.core.resources.IProject; //導入方法依賴的package包/類
@Override
public void removeProject(ToBeBuilt toBeBuilt, IProject project, IProgressMonitor monitor) {
	storageMapper.collectNfarURIs(project, toBeBuilt.getToBeDeleted());
	Iterator<Map.Entry<String, Set<URI>>> iterator = knownEntries.entrySet().iterator();
	String keyPrefix = project.getName() + "|";
	while (iterator.hasNext()) {
		String key = iterator.next().getKey();
		if (key.startsWith(keyPrefix)) {
			iterator.remove();
		}
	}
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:13,代碼來源:N4JSToBeBuiltComputer.java

示例6: removeStorage

import org.eclipse.core.resources.IProject; //導入方法依賴的package包/類
@Override
public boolean removeStorage(ToBeBuilt toBeBuilt, IStorage storage, IProgressMonitor monitor) {
	if (IN4JSArchive.NFAR_FILE_EXTENSION.equals(storage.getFullPath().getFileExtension())
			&& storage instanceof IFile) {
		IProject project = ((IFile) storage).getProject();
		String key = project.getName() + "|" + storage.getFullPath().toPortableString();
		Set<URI> cachedURIs = knownEntries.remove(key);
		if (cachedURIs != null) {
			toBeBuilt.getToBeDeleted().addAll(cachedURIs);
		} else {
			// cache not populated, use the index to find the URIs that shall be removed, e.g.
			// can happen after a restart of Eclipse
			Iterable<IResourceDescription> descriptions = builderState.getAllResourceDescriptions();
			String expectedAuthority = "platform:/resource" + storage.getFullPath() + "!";
			Set<URI> toBeDeleted = toBeBuilt.getToBeDeleted();
			for (IResourceDescription description : descriptions) {
				URI knownURI = description.getURI();
				if (knownURI.isArchive()) {
					String authority = knownURI.authority();
					if (expectedAuthority.equals(authority)) {
						toBeDeleted.add(knownURI);
					}
				}
			}
		}
		return true;
	}
	return false;
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:30,代碼來源:N4JSToBeBuiltComputer.java

示例7: getToBeBuilt

import org.eclipse.core.resources.IProject; //導入方法依賴的package包/類
@Override
protected ToBeBuilt getToBeBuilt(ToBeBuiltComputer computer, IProject project, IProgressMonitor monitor) {
	try {
		return computer.updateProject(project, monitor);
	} catch (OperationCanceledException | CoreException e) {
		final String name = project.getName();
		LOGGER.error("Error occurred while calculating to be build data for '" + name + "' project.", e);
		throw Exceptions.sneakyThrow(e);
	}
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:11,代碼來源:ExternalLibraryBuilderHelper.java

示例8: baseProjectName

import org.eclipse.core.resources.IProject; //導入方法依賴的package包/類
/**
 * Computer the base name for a project base on xdsml project
 * ie. if it ends with .xdsml this suffix is removed
 * @param xdsmlProject
 * @return
 */
public static String baseProjectName(IProject xdsmlProject){
	int index = xdsmlProject.getName().indexOf(".xdsml");
	if(index != -1){
		return xdsmlProject.getName().substring(0, index);		
	}
	return xdsmlProject.getName();
}
 
開發者ID:eclipse,項目名稱:gemoc-studio-modeldebugging,代碼行數:14,代碼來源:MelangeXDSMLProjectHelper.java

示例9: getTempFileName

import org.eclipse.core.resources.IProject; //導入方法依賴的package包/類
@Override
protected String getTempFileName(IProject project) {
	TreeObject object = getTreeObjectOwner();
	
	Document document = (Document)object.getObject();
	
	String tempFileName = 	"_private/"+project.getName()+
			"__"+getConnectorTreeObject().getName()+
			"__"+document.getName()+
			"__updates."+getName();
	
	return tempFileName;
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:14,代碼來源:DesignDocumentUpdateTreeObject.java

示例10: openJscriptHandlerEditor

import org.eclipse.core.resources.IProject; //導入方法依賴的package包/類
public void openJscriptHandlerEditor(IProject project) {
	
	ProjectExplorerView explorerView = ConvertigoPlugin.getDefault().getProjectExplorerView();
	
	TreeObject selectedHandler = explorerView.getFirstSelectedTreeObject();
	TreeObject object = selectedHandler; 

	while (!(object instanceof TransactionTreeObject)) {
		object = object.getParent();
	}
	
	Transaction transaction = (Transaction)object.getObject();
	
	String tempFileName = 	"_private/"+project.getName()+
							"__"+getConnectorTreeObject().getName()+
							"__"+object.getName();
	
	IFile file = project.getFile(tempFileName);

	IWorkbenchPage activePage = PlatformUI
									.getWorkbench()
									.getActiveWorkbenchWindow()
									.getActivePage();
	if (activePage != null) {
		try {
			activePage.openEditor(new JscriptTransactionEditorInput(file,transaction),
									"com.twinsoft.convertigo.eclipse.editors.jscript.JscriptTransactionEditor");
			moveTo(selectedHandler.getName());
		} catch(PartInitException e) {
			ConvertigoPlugin.logException(e, "Error while loading the transaction editor '" + transaction.getName() + "'");
		} 
	}
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:34,代碼來源:HandlersDeclarationTreeObject.java

示例11: getTempFileName

import org.eclipse.core.resources.IProject; //導入方法依賴的package包/類
@Override
protected String getTempFileName(IProject project) {
	TreeObject object = getTreeObjectOwner();
	
	Document document = (Document)object.getObject();
	
	String tempFileName = 	"_private/"+project.getName()+
			"__"+getConnectorTreeObject().getName()+
			"__"+document.getName()+
			"__filters."+getName();
	
	return tempFileName;
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:14,代碼來源:DesignDocumentFilterTreeObject.java

示例12: getTempFileName

import org.eclipse.core.resources.IProject; //導入方法依賴的package包/類
protected String getTempFileName(IProject project) {
	TreeObject object = getTreeObjectOwner();
	
	Document document = (Document)object.getObject();
	
	String tempFileName = 	"_private/"+project.getName()+
			"__"+getConnectorTreeObject().getName()+
			"__"+document.getName()+
			"__views."+getParent().getName()+"."+getName();
	
	return tempFileName;
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:13,代碼來源:DesignDocumentFunctionTreeObject.java

示例13: openEditor

import org.eclipse.core.resources.IProject; //導入方法依賴的package包/類
public static void openEditor(IWorkbenchPage page, IProject proj) throws PartInitException {
    Log.log(Log.LOG_INFO, "Opening editor for project: " + proj.getName()); //$NON-NLS-1$
    if (OpenProjectUtils.checkVersionAndWarn(proj, page.getWorkbenchWindow().getShell(), true)) {
        ProjectEditorInput input = new ProjectEditorInput(proj.getName());
        page.openEditor(input, EDITOR.PROJECT);
    }
}
 
開發者ID:pgcodekeeper,項目名稱:pgcodekeeper,代碼行數:8,代碼來源:OpenEditor.java

示例14: execute

import org.eclipse.core.resources.IProject; //導入方法依賴的package包/類
@Override
public Object execute(ExecutionEvent event) {
    IEditorPart part = HandlerUtil.getActiveEditor(event);

    if (part instanceof ProjectEditorDiffer){
        ((ProjectEditorDiffer) part).getChanges();
    } else if (part instanceof SQLEditor && part.getEditorInput() instanceof IFileEditorInput) {
        try {
            SQLEditor sqlEditor = (SQLEditor) part;
            IProject proj = ((IFileEditorInput) sqlEditor.getEditorInput()).getFile().getProject();

            DbInfo remote = sqlEditor.getCurrentDb();
            ProjectEditorDiffer editor = ChangesJobTester.findProjectEditor(proj);
            if (editor == null) {
                ProjectEditorDiffer.saveLastDb(remote, proj);
                ProjectEditorInput projectEditorInput = new ProjectEditorInput(proj.getName());
                editor = (ProjectEditorDiffer) sqlEditor.getSite().getPage()
                        .openEditor(projectEditorInput, EDITOR.PROJECT);
            } else {
                editor.setCurrentDb(remote);
                editor.getSite().getPage().activate(editor);
            }
            editor.getChanges();
        } catch (PartInitException e) {
            ExceptionNotifier.notifyDefault(e.getLocalizedMessage(), e);
        }
    }
    return null;
}
 
開發者ID:pgcodekeeper,項目名稱:pgcodekeeper,代碼行數:30,代碼來源:GetChanges.java

示例15: getParameterFileIPath

import org.eclipse.core.resources.IProject; //導入方法依賴的package包/類
private IPath getParameterFileIPath(){
	IFileEditorInput input = (IFileEditorInput)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor().getEditorInput() ;
    IFile file = input.getFile();
    IProject activeProject = file.getProject();
    String activeProjectName = activeProject.getName();
    
    //java.nio.file.Path path= java.nio.file.Path(parameterFile)
    Path filePath = Paths.get(parameterFile, "");
    
    IPath parameterFileIPath =new org.eclipse.core.runtime.Path("/"+activeProjectName+"/param/"+filePath.getFileName().toString().replace("job", "properties"));
    
	return parameterFileIPath;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:14,代碼來源:ParameterGridDialog.java


注:本文中的org.eclipse.core.resources.IProject.getName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。