org.eclipse.ui.navigator.IExtensionStateModel Java Examples

The following examples show how to use org.eclipse.ui.navigator.IExtensionStateModel. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JavaNavigatorContentProvider.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 6 votes vote down vote up
public void init(ICommonContentExtensionSite commonContentExtensionSite) {
	IExtensionStateModel stateModel = commonContentExtensionSite
			.getExtensionStateModel();
	IMemento memento = commonContentExtensionSite.getMemento();

	fStateModel = stateModel;
	restoreState(memento);
	fLayoutPropertyListener = new IPropertyChangeListener() {
		public void propertyChange(PropertyChangeEvent event) {
			if (Values.IS_LAYOUT_FLAT.equals(event.getProperty())) {
				if (event.getNewValue() != null) {
					boolean newValue = ((Boolean) event.getNewValue())
							.booleanValue() ? true : false;
					setIsFlatLayout(newValue);
				}
			}

		}
	};
	fStateModel.addPropertyChangeListener(fLayoutPropertyListener);

	IPreferenceStore store = PreferenceConstants.getPreferenceStore();
	boolean showCUChildren = store
			.getBoolean(PreferenceConstants.SHOW_CU_CHILDREN);
	setProvideMembers(showCUChildren);
}
 
Example #2
Source File: ExtensionStateModelAccessor.java    From xds-ide with Eclipse Public License 1.0 4 votes vote down vote up
ExtensionStateModelAccessor(IExtensionStateModel extensionStateModel) {
	this.extensionStateModel = extensionStateModel;
}
 
Example #3
Source File: ShowResourcesContribution.java    From xds-ide with Eclipse Public License 1.0 4 votes vote down vote up
public ShowResourcesContribution(StructuredViewer structuredViewer, IExtensionStateModel extensionStateModel) {
	super(ID);
	this.structuredViewer = structuredViewer;
	this.stateModelAccess = new ExtensionStateModelAccessor(extensionStateModel);
}
 
Example #4
Source File: CommonLayoutActionGroup.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
public CommonLayoutActionGroup(StructuredViewer structuredViewer,
		IExtensionStateModel stateModel) {
	super();
	fStateModel = stateModel;
	fStructuredViewer = structuredViewer;
}
 
Example #5
Source File: WorkingSetRootModeActionGroup.java    From translationstudio8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * @param sStateModel
 */
public void setStateModel(IExtensionStateModel sStateModel) {
	stateModel = sStateModel;
}
 
Example #6
Source File: WorkingSetRootModeActionGroup.java    From tmxeditor8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * @param sStateModel
 */
public void setStateModel(IExtensionStateModel sStateModel) {
	stateModel = sStateModel;
}
 
Example #7
Source File: WorkingSetRootModeActionGroup.java    From translationstudio8 with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Create an action group that will listen to the stateModel and update the
 * structuredViewer when necessary.
 * 
 * @param aStructuredViewer
 * @param aStateModel
 */
public WorkingSetRootModeActionGroup(StructuredViewer aStructuredViewer,
		IExtensionStateModel aStateModel) {
	super();
	structuredViewer = aStructuredViewer;
	stateModel = aStateModel;
}
 
Example #8
Source File: WorkingSetRootModeActionGroup.java    From tmxeditor8 with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Create an action group that will listen to the stateModel and update the
 * structuredViewer when necessary.
 * 
 * @param aStructuredViewer
 * @param aStateModel
 */
public WorkingSetRootModeActionGroup(StructuredViewer aStructuredViewer,
		IExtensionStateModel aStateModel) {
	super();
	structuredViewer = aStructuredViewer;
	stateModel = aStateModel;
}