本文整理汇总了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();
}
}
示例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;
}
}
示例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);
}
示例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;
}
}
示例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;
}
}
示例6: resourceChanged
public void resourceChanged(IResourceChangeEvent event) {
if (event.getType() == IResourceChangeEvent.PRE_BUILD && touchProducts) {
touchProducts();
}
}