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


Java IResourceChangeEvent.PRE_BUILD屬性代碼示例

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


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

示例1: resourceChanged

@Override
public void resourceChanged(IResourceChangeEvent event)
{
	if( event.getType() == IResourceChangeEvent.PRE_BUILD )
	{
		IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
		if( fTouchWorkspace )
		{
			IProject[] projects = root.getProjects();
			for( int i = 0; i < projects.length; i++ )
			{
				touchProject(projects[i]);
			}
		}
		else
		{
			Iterator<String> iter = fProjectNames.iterator();
			while( iter.hasNext() )
			{
				touchProject(root.getProject(iter.next()));
			}
		}
		fTouchWorkspace = false;
		fProjectNames.clear();
	}
}
 
開發者ID:equella,項目名稱:Equella,代碼行數:26,代碼來源:JPFPluginRebuilder.java

示例2: resourceChanged

public void resourceChanged(final IResourceChangeEvent event) {
	switch (event.getType()) {
	case IResourceChangeEvent.PRE_DELETE:
		break;
	case IResourceChangeEvent.POST_CHANGE:
		try {
			DeltaVisitor visitor = new DeltaVisitor(ABasicEditor.this);
			event.getDelta().accept(visitor);
		} catch (CoreException e) {
			UIUtils.showError(e);
		}
		break;
	case IResourceChangeEvent.PRE_BUILD:
	case IResourceChangeEvent.POST_BUILD:
		break;
	}
}
 
開發者ID:OpenSoftwareSolutions,項目名稱:PDFReporter-Studio,代碼行數:17,代碼來源:ABasicEditor.java

示例3: N4JSProjectExplorerContentProvider

/**
 * Creates a new content provider for the navigator with N4JS content support.
 *
 * @param store
 *            the preference store;
 */
@Inject
public N4JSProjectExplorerContentProvider(final ExternalLibraryPreferenceStore store) {
	store.addListener(this);
	int eventMask = IResourceChangeEvent.PRE_BUILD | IResourceChangeEvent.POST_CHANGE;
	getWorkspace().addResourceChangeListener(this::cleanBuildOrManifestChangedEvent, eventMask);
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:12,代碼來源:N4JSProjectExplorerContentProvider.java

示例4: resourceChanged

/**
 * Closes all project files on project close.
 * 
 * @param event
 *          the event
 */
public void resourceChanged(final IResourceChangeEvent event) {
	switch (event.getType()) {
	case IResourceChangeEvent.PRE_CLOSE:
		Display.getDefault().asyncExec(new Runnable() {
			public void run() {
				IWorkbenchPage[] pages = getSite().getWorkbenchWindow().getPages();
				for (int i = 0; i < pages.length; i++) {
					if (((FileEditorInput) xmlEditor.getEditorInput()).getFile().getProject().equals(event.getResource())) {
						IEditorPart editorPart = pages[i].findEditor(xmlEditor.getEditorInput());
						pages[i].closeEditor(editorPart, true);
					}
				}
			}
		});
		break;
	case IResourceChangeEvent.PRE_DELETE:
		break;
	case IResourceChangeEvent.POST_CHANGE:
		try {
			DeltaVisitor visitor = new DeltaVisitor(this);
			event.getDelta().accept(visitor);
			if (jrContext != null && getEditorInput() != null)
				jrContext.init(((IFileEditorInput) getEditorInput()).getFile());
		} catch (CoreException e) {
			UIUtils.showError(e);
		}
		break;
	case IResourceChangeEvent.PRE_BUILD:
	case IResourceChangeEvent.POST_BUILD:
		break;
	}
}
 
開發者ID:OpenSoftwareSolutions,項目名稱:PDFReporter-Studio,代碼行數:38,代碼來源:AMultiEditor.java

示例5: resourceChanged

/**
 * Closes all project files on project close.
 * 
 * @param event
 *          the event
 */
public void resourceChanged(final IResourceChangeEvent event) {
	if (isRefresh)
		return;
	switch (event.getType()) {
	case IResourceChangeEvent.PRE_CLOSE:
		Display.getDefault().asyncExec(new Runnable() {
			public void run() {
				IWorkbenchPage[] pages = getSite().getWorkbenchWindow().getPages();
				for (int i = 0; i < pages.length; i++) {
					if (((FileEditorInput) xmlEditor.getEditorInput()).getFile().getProject().equals(event.getResource())) {
						IEditorPart editorPart = pages[i].findEditor(xmlEditor.getEditorInput());
						pages[i].closeEditor(editorPart, true);
					}
				}
			}
		});
		break;
	case IResourceChangeEvent.PRE_DELETE:
		break;
	case IResourceChangeEvent.POST_CHANGE:
		try {
			DeltaVisitor visitor = new DeltaVisitor(this);
			event.getDelta().accept(visitor);
			if (jrContext != null && getEditorInput() != null)
				jrContext.init(((IFileEditorInput) getEditorInput()).getFile());
		} catch (CoreException e) {
			UIUtils.showError(e);
		}
		break;
	case IResourceChangeEvent.PRE_BUILD:
	case IResourceChangeEvent.POST_BUILD:
		break;
	}
}
 
開發者ID:OpenSoftwareSolutions,項目名稱:PDFReporter-Studio,代碼行數:40,代碼來源:JrxmlEditor.java

示例6: resourceChanged

public void resourceChanged(IResourceChangeEvent event) {
	if (event.getType() == IResourceChangeEvent.PRE_BUILD && touchProducts) {
		touchProducts();
	}
}
 
開發者ID:secondfiddle,項目名稱:pep-tools,代碼行數:5,代碼來源:ProductRebuilder.java


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