當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。