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


Java IModelProviderEvent类代码示例

本文整理汇总了Java中org.eclipse.pde.core.IModelProviderEvent的典型用法代码示例。如果您正苦于以下问题:Java IModelProviderEvent类的具体用法?Java IModelProviderEvent怎么用?Java IModelProviderEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: createSingleModel

import org.eclipse.pde.core.IModelProviderEvent; //导入依赖的package包/类
private void createSingleModel(IProject project, IFile product, boolean notify) {
	IProductModel model = new WorkspaceProductModel(product, true);
	loadModel(model, false);

	if (getModelsMap() == null) {
		setModelsMap(new HashMap<IProject, Collection<IProductModel>>());
	}

	Collection<IProductModel> models = getModelsMap().get(project);
	if (models == null) {
		models = new ArrayList<IProductModel>();
		getModelsMap().put(project, models);
	}

	models.add(model);

	if (notify) {
		addChange(model, IModelProviderEvent.MODELS_ADDED);
	}
}
 
开发者ID:secondfiddle,项目名称:pep-tools,代码行数:21,代码来源:WorkspaceProductModelManager.java

示例2: handleFileDelta

import org.eclipse.pde.core.IModelProviderEvent; //导入依赖的package包/类
@Override
protected void handleFileDelta(IResourceDelta delta) {
	IFile file = (IFile) delta.getResource();
	IProject project = file.getProject();

	if (ProductSupport.isProductFile(file)) {
		Object model = getSingleModel(file);
		int kind = delta.getKind();
		if (kind == IResourceDelta.REMOVED && model != null) {
			removeSingleModel(project, model);
		} else if (kind == IResourceDelta.ADDED && model == null) {
			createSingleModel(project, file, true);
		} else if (kind == IResourceDelta.CHANGED && (IResourceDelta.CONTENT & delta.getFlags()) != 0) {
			loadModel((IProductModel) model, true);
			addChange(model, IModelProviderEvent.MODELS_CHANGED);
		}
	}
}
 
开发者ID:secondfiddle,项目名称:pep-tools,代码行数:19,代码来源:WorkspaceProductModelManager.java

示例3: removeModel

import org.eclipse.pde.core.IModelProviderEvent; //导入依赖的package包/类
@Override
protected Object removeModel(IProject project) {
	Collection<IProductModel> models = getModelsMap() != null ? getModelsMap().remove(project) : null;
	if (models != null) {
		for (IProductModel model : models) {
			addChange(model, IModelProviderEvent.MODELS_REMOVED);
		}
	}
	return models;
}
 
开发者ID:secondfiddle,项目名称:pep-tools,代码行数:11,代码来源:WorkspaceProductModelManager.java

示例4: removeSingleModel

import org.eclipse.pde.core.IModelProviderEvent; //导入依赖的package包/类
private Object removeSingleModel(IProject project, Object model) {
	Collection<IProductModel> models = getModelsMap() != null ? getModelsMap().get(project) : null;
	if (models != null) {
		if (models.remove(model)) {
			addChange(model, IModelProviderEvent.MODELS_REMOVED);
		}
		if (models.isEmpty()) {
			getModelsMap().remove(project);
		}
	}
	return models;
}
 
开发者ID:secondfiddle,项目名称:pep-tools,代码行数:13,代码来源:WorkspaceProductModelManager.java

示例5: ProductModelManager

import org.eclipse.pde.core.IModelProviderEvent; //导入依赖的package包/类
private ProductModelManager() {
	this.workspaceProductModelManager = new WorkspaceProductModelManager();
	this.workspaceProductModelManager.addModelProviderListener(new IModelProviderListener() {
		@Override
		public void modelsChanged(IModelProviderEvent event) {
			handleModelProviderChange(event);
		}
	});
}
 
开发者ID:secondfiddle,项目名称:pep-tools,代码行数:10,代码来源:ProductModelManager.java

示例6: modelsChanged

import org.eclipse.pde.core.IModelProviderEvent; //导入依赖的package包/类
public void modelsChanged(IModelProviderEvent event) {
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:3,代码来源:BuildToolWizardPage.java

示例7: modelsChanged

import org.eclipse.pde.core.IModelProviderEvent; //导入依赖的package包/类
@Override
public void modelsChanged(IModelProviderEvent event) {
	// TODO Auto-generated method stub
}
 
开发者ID:patternbox,项目名称:patternbox-eclipse,代码行数:5,代码来源:SectPatternParticipants.java


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