本文整理汇总了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);
}
}
示例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);
}
}
}
示例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;
}
示例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;
}
示例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);
}
});
}
示例6: modelsChanged
import org.eclipse.pde.core.IModelProviderEvent; //导入依赖的package包/类
public void modelsChanged(IModelProviderEvent event) {
}
示例7: modelsChanged
import org.eclipse.pde.core.IModelProviderEvent; //导入依赖的package包/类
@Override
public void modelsChanged(IModelProviderEvent event) {
// TODO Auto-generated method stub
}