当前位置: 首页>>代码示例>>Java>>正文


Java IResourceChangeEvent.POST_BUILD属性代码示例

本文整理汇总了Java中org.eclipse.core.resources.IResourceChangeEvent.POST_BUILD属性的典型用法代码示例。如果您正苦于以下问题:Java IResourceChangeEvent.POST_BUILD属性的具体用法?Java IResourceChangeEvent.POST_BUILD怎么用?Java IResourceChangeEvent.POST_BUILD使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.eclipse.core.resources.IResourceChangeEvent的用法示例。


在下文中一共展示了IResourceChangeEvent.POST_BUILD属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: 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

示例2: resourceChanged

@Override
public void resourceChanged(IResourceChangeEvent event) {
    if (event.getType() == IResourceChangeEvent.POST_BUILD) {
        ChangedClassFilesVisitor visitor = getChangedClassFiles(event);
        if (visitor != null) {
            List<IResource> resources = visitor.getChangedClassFiles();
            List<String> classNames = visitor.getQualifiedNamesList();
            synchronized (this) {
                deltaResources.addAll(resources);
                deltaClassNames.addAll(classNames);
            }
            publishEvent(HotCodeReplaceEvent.EventType.BUILD_COMPLETE, "Build completed.");
        }
    }
}
 
开发者ID:Microsoft,项目名称:java-debug,代码行数:15,代码来源:JavaHotCodeReplaceProvider.java

示例3: getChangedClassFiles

/**
 * Returns the class file visitor after visiting the resource change. The
 * visitor contains the changed class files and qualified type names. Returns
 * <code>null</code> if the visitor encounters an exception, or the delta is not
 * a POST_BUILD.
 */
private ChangedClassFilesVisitor getChangedClassFiles(IResourceChangeEvent event) {
    IResourceDelta delta = event.getDelta();
    if (event.getType() != IResourceChangeEvent.POST_BUILD || delta == null) {
        return null;
    }
    classFilesVisitor.reset();
    try {
        delta.accept(classFilesVisitor);
    } catch (CoreException e) {
        return null; // quiet failure
    }
    return classFilesVisitor;
}
 
开发者ID:Microsoft,项目名称:java-debug,代码行数:19,代码来源:JavaHotCodeReplaceProvider.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

@Override
public void resourceChanged(final IResourceChangeEvent event) {
    if (event.getType() == IResourceChangeEvent.POST_BUILD) {
        policy.onBuild();
    }
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:6,代码来源:BuildPolicyResourceChangedListener.java


注:本文中的org.eclipse.core.resources.IResourceChangeEvent.POST_BUILD属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。