當前位置: 首頁>>代碼示例>>Java>>正文


Java StructuredSelection類代碼示例

本文整理匯總了Java中org.eclipse.jface.viewers.StructuredSelection的典型用法代碼示例。如果您正苦於以下問題:Java StructuredSelection類的具體用法?Java StructuredSelection怎麽用?Java StructuredSelection使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


StructuredSelection類屬於org.eclipse.jface.viewers包,在下文中一共展示了StructuredSelection類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setInputClock

import org.eclipse.jface.viewers.StructuredSelection; //導入依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.polarsys.time4sys.ui.hrm.parts.TimingPropertiesEditionPart#setInputClock(EObject
 *      newValue)
 * 
 */
public void setInputClock(EObject newValue) {
	if (newValue != null) {
		inputClock.setSelection(new StructuredSelection(newValue));
	} else {
		inputClock.setSelection(new StructuredSelection()); // $NON-NLS-1$
	}
	boolean eefElementEditorReadOnlyState = isReadOnly(HrmViewsRepository.Timing.TimingProperties.inputClock);
	if (eefElementEditorReadOnlyState && inputClock.isEnabled()) {
		inputClock.setEnabled(false);
		inputClock.setToolTipText(HrmMessages.Timing_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !inputClock.isEnabled()) {
		inputClock.setEnabled(true);
	}

}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:23,代碼來源:TimingPropertiesEditionPartImpl.java

示例2: setParent_

import org.eclipse.jface.viewers.StructuredSelection; //導入依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.polarsys.time4sys.ui.analysis.parts.TwcaEventModelPropertiesEditionPart#setParent_(EObject newValue)
 * @generated
 */
public void setParent_(EObject newValue) {
	if (newValue != null) {
		parent_.setSelection(new StructuredSelection(newValue));
	} else {
		parent_.setSelection(new StructuredSelection()); //$NON-NLS-1$
	}
	boolean eefElementEditorReadOnlyState = isReadOnly(AnalysisViewsRepository.TwcaEventModel.Properties.parent_);
	if (eefElementEditorReadOnlyState && parent_.isEnabled()) {
		parent_.setEnabled(false);
		parent_.setToolTipText(AnalysisMessages.TwcaEventModel_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !parent_.isEnabled()) {
		parent_.setEnabled(true);
	}	
	
}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:22,代碼來源:TwcaEventModelPropertiesEditionPartImpl.java

示例3: setContext

import org.eclipse.jface.viewers.StructuredSelection; //導入依賴的package包/類
@Override
public void setContext(final ActionContext context) {
	super.setContext(context);

	projectGroup.setContext(context);

	// context is null if disposal of the provider is triggered
	if (null != context) {
		StructuredSelection selection = (StructuredSelection) context.getSelection();
		List<Object> selectedElements = Arrays.asList(selection.toArray());

		selectionContainsWorkingSet = selectedElements.stream()
				.anyMatch(element -> element instanceof WorkingSet);

		// try to minimize number of context updates for working set action provider
		if (selectionContainsWorkingSet) {
			workingSetActionProvider.setContext(context);
		}

		assignWorkingSetsAction.selectionChanged(selection);
	}
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:23,代碼來源:N4JSNavigatorActionProvider.java

示例4: setUsedBy

import org.eclipse.jface.viewers.StructuredSelection; //導入依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.polarsys.time4sys.ui.analysis.parts.SchedulerPropertiesEditionPart#setUsedBy(EObject newValue)
 * @generated
 */
public void setUsedBy(EObject newValue) {
	if (newValue != null) {
		usedBy.setSelection(new StructuredSelection(newValue));
	} else {
		usedBy.setSelection(new StructuredSelection()); //$NON-NLS-1$
	}
	boolean eefElementEditorReadOnlyState = isReadOnly(AnalysisViewsRepository.Scheduler.Properties.usedBy);
	if (eefElementEditorReadOnlyState && usedBy.isEnabled()) {
		usedBy.setEnabled(false);
		usedBy.setToolTipText(AnalysisMessages.Scheduler_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !usedBy.isEnabled()) {
		usedBy.setEnabled(true);
	}	
	
}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:22,代碼來源:SchedulerPropertiesEditionPartForm.java

示例5: setSet

import org.eclipse.jface.viewers.StructuredSelection; //導入依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.polarsys.time4sys.ui.grm.parts.GeneralPropertiesEditionPart#setSet(EObject
 *      newValue)
 * 
 */
public void setSet(EObject newValue) {
	if (newValue != null) {
		set.setSelection(new StructuredSelection(newValue));
	} else {
		set.setSelection(new StructuredSelection()); // $NON-NLS-1$
	}
	boolean eefElementEditorReadOnlyState = isReadOnly(GrmViewsRepository.General.Properties.set);
	if (eefElementEditorReadOnlyState && set.isEnabled()) {
		set.setEnabled(false);
		set.setToolTipText(GrmMessages.General_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !set.isEnabled()) {
		set.setEnabled(true);
	}

}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:23,代碼來源:GeneralPropertiesEditionPartImpl.java

示例6: setTargetPort

import org.eclipse.jface.viewers.StructuredSelection; //導入依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.polarsys.time4sys.ui.hrm.parts.GeneralPropertiesEditionPart#setTargetPort(EObject
 *      newValue)
 * 
 */
public void setTargetPort(EObject newValue) {
	if (newValue != null) {
		targetPort.setSelection(new StructuredSelection(newValue));
	} else {
		targetPort.setSelection(new StructuredSelection()); // $NON-NLS-1$
	}
	boolean eefElementEditorReadOnlyState = isReadOnly(HrmViewsRepository.General.Properties.targetPort);
	if (eefElementEditorReadOnlyState && targetPort.isEnabled()) {
		targetPort.setEnabled(false);
		targetPort.setToolTipText(HrmMessages.General_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !targetPort.isEnabled()) {
		targetPort.setEnabled(true);
	}

}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:23,代碼來源:GeneralPropertiesEditionPartForm.java

示例7: setDestination

import org.eclipse.jface.viewers.StructuredSelection; //導入依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see be.cetic.simqri.metamodel.parts.StorageOutputFlowPropertiesEditionPart#setDestination(EObject newValue)
 * 
 */
public void setDestination(EObject newValue) {
	if (newValue != null) {
		destination.setSelection(new StructuredSelection(newValue));
	} else {
		destination.setSelection(new StructuredSelection()); //$NON-NLS-1$
	}
	boolean eefElementEditorReadOnlyState = isReadOnly(MetamodelViewsRepository.StorageOutputFlow.Properties.destination);
	if (eefElementEditorReadOnlyState && destination.isEnabled()) {
		destination.setEnabled(false);
		destination.setToolTipText(MetamodelMessages.StorageOutputFlow_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !destination.isEnabled()) {
		destination.setEnabled(true);
	}	
	
}
 
開發者ID:cetic,項目名稱:SimQRI,代碼行數:22,代碼來源:StorageOutputFlowPropertiesEditionPartForm.java

示例8: setSelectionToViewer

import org.eclipse.jface.viewers.StructuredSelection; //導入依賴的package包/類
/**
 * This sets the selection into whichever viewer is active.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void setSelectionToViewer(Collection<?> collection) {
	final Collection<?> theSelection = collection;
	// Make sure it's okay.
	//
	if (theSelection != null && !theSelection.isEmpty()) {
		Runnable runnable =
			new Runnable() {
				public void run() {
					// Try to select the items in the current content viewer of the editor.
					//
					if (currentViewer != null) {
						currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true);
					}
				}
			};
		getSite().getShell().getDisplay().asyncExec(runnable);
	}
}
 
開發者ID:occiware,項目名稱:OCCI-Studio,代碼行數:25,代碼來源:CrtpEditor.java

示例9: setParent_

import org.eclipse.jface.viewers.StructuredSelection; //導入依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.polarsys.time4sys.ui.analysis.parts.InputPortPropertiesEditionPart#setParent_(EObject newValue)
 * @generated
 */
public void setParent_(EObject newValue) {
	if (newValue != null) {
		parent_.setSelection(new StructuredSelection(newValue));
	} else {
		parent_.setSelection(new StructuredSelection()); //$NON-NLS-1$
	}
	boolean eefElementEditorReadOnlyState = isReadOnly(AnalysisViewsRepository.InputPort.Properties.parent_);
	if (eefElementEditorReadOnlyState && parent_.isEnabled()) {
		parent_.setEnabled(false);
		parent_.setToolTipText(AnalysisMessages.InputPort_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !parent_.isEnabled()) {
		parent_.setEnabled(true);
	}	
	
}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:22,代碼來源:InputPortPropertiesEditionPartForm.java

示例10: setScheduler

import org.eclipse.jface.viewers.StructuredSelection; //導入依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.polarsys.time4sys.ui.analysis.parts.ComputingResourcePropertiesEditionPart#setScheduler(EObject newValue)
 * @generated
 */
public void setScheduler(EObject newValue) {
	if (newValue != null) {
		scheduler.setSelection(new StructuredSelection(newValue));
	} else {
		scheduler.setSelection(new StructuredSelection()); //$NON-NLS-1$
	}
	boolean eefElementEditorReadOnlyState = isReadOnly(AnalysisViewsRepository.ComputingResource.Properties.scheduler);
	if (eefElementEditorReadOnlyState && scheduler.isEnabled()) {
		scheduler.setEnabled(false);
		scheduler.setToolTipText(AnalysisMessages.ComputingResource_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !scheduler.isEnabled()) {
		scheduler.setEnabled(true);
	}	
	
}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:22,代碼來源:ComputingResourcePropertiesEditionPartImpl.java

示例11: setRelRes

import org.eclipse.jface.viewers.StructuredSelection; //導入依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.polarsys.time4sys.ui.gqam.parts.GeneralPropertiesEditionPart#setRelRes(EObject
 *      newValue)
 * 
 */
public void setRelRes(EObject newValue) {
	if (newValue != null) {
		relRes.setSelection(new StructuredSelection(newValue));
	} else {
		relRes.setSelection(new StructuredSelection()); // $NON-NLS-1$
	}
	boolean eefElementEditorReadOnlyState = isReadOnly(GqamViewsRepository.General.Properties.relRes);
	if (eefElementEditorReadOnlyState && relRes.isEnabled()) {
		relRes.setEnabled(false);
		relRes.setToolTipText(GqamMessages.General_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !relRes.isEnabled()) {
		relRes.setEnabled(true);
	}

}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:23,代碼來源:GeneralPropertiesEditionPartImpl.java

示例12: setTargetPort

import org.eclipse.jface.viewers.StructuredSelection; //導入依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.polarsys.time4sys.ui.srm.parts.GeneralPropertiesEditionPart#setTargetPort(EObject
 *      newValue)
 * 
 */
public void setTargetPort(EObject newValue) {
	if (newValue != null) {
		targetPort.setSelection(new StructuredSelection(newValue));
	} else {
		targetPort.setSelection(new StructuredSelection()); // $NON-NLS-1$
	}
	boolean eefElementEditorReadOnlyState = isReadOnly(SrmViewsRepository.General.Properties.targetPort);
	if (eefElementEditorReadOnlyState && targetPort.isEnabled()) {
		targetPort.setEnabled(false);
		targetPort.setToolTipText(SrmMessages.General_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !targetPort.isEnabled()) {
		targetPort.setEnabled(true);
	}

}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:23,代碼來源:GeneralPropertiesEditionPartImpl.java

示例13: loadFrom

import org.eclipse.jface.viewers.StructuredSelection; //導入依賴的package包/類
/**
 * Load the current state from the dialog settings
 */
private void loadFrom ()
{
    this.flagCredentialsAsProperties = this.dialogSettings.getBoolean ( SETTING_AS_PROPERTIES );
    final String user = this.dialogSettings.get ( SETTING_USER );
    final String contextId = this.dialogSettings.get ( SETTING_CONTEXT );
    if ( user != null && contextId != null )
    {
        this.userText.setText ( user );
        for ( final LoginContext context : this.contexts )
        {
            if ( context.getId ().equals ( contextId ) )
            {
                this.contextSelector.setSelection ( new StructuredSelection ( context ), true );
            }
        }
        this.passwordText.setFocus ();
    }
    else
    {
        this.contextSelector.getControl ().setFocus ();
    }
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:26,代碼來源:LoginDialog.java

示例14: setHost

import org.eclipse.jface.viewers.StructuredSelection; //導入依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.polarsys.time4sys.ui.srm.parts.GeneralPropertiesEditionPart#setHost(EObject
 *      newValue)
 * 
 */
public void setHost(EObject newValue) {
	if (newValue != null) {
		host.setSelection(new StructuredSelection(newValue));
	} else {
		host.setSelection(new StructuredSelection()); // $NON-NLS-1$
	}
	boolean eefElementEditorReadOnlyState = isReadOnly(SrmViewsRepository.General.Properties.host);
	if (eefElementEditorReadOnlyState && host.isEnabled()) {
		host.setEnabled(false);
		host.setToolTipText(SrmMessages.General_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !host.isEnabled()) {
		host.setEnabled(true);
	}

}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:23,代碼來源:GeneralPropertiesEditionPartForm.java

示例15: setParent_

import org.eclipse.jface.viewers.StructuredSelection; //導入依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.polarsys.time4sys.ui.analysis.parts.RequiredProtectionParameterPropertiesEditionPart#setParent_(EObject newValue)
 * @generated
 */
public void setParent_(EObject newValue) {
	if (newValue != null) {
		parent_.setSelection(new StructuredSelection(newValue));
	} else {
		parent_.setSelection(new StructuredSelection()); //$NON-NLS-1$
	}
	boolean eefElementEditorReadOnlyState = isReadOnly(AnalysisViewsRepository.RequiredProtectionParameter.Properties.parent_);
	if (eefElementEditorReadOnlyState && parent_.isEnabled()) {
		parent_.setEnabled(false);
		parent_.setToolTipText(AnalysisMessages.RequiredProtectionParameter_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !parent_.isEnabled()) {
		parent_.setEnabled(true);
	}	
	
}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:22,代碼來源:RequiredProtectionParameterPropertiesEditionPartForm.java


注:本文中的org.eclipse.jface.viewers.StructuredSelection類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。