本文整理汇总了Java中org.eclipse.gef.Request.getType方法的典型用法代码示例。如果您正苦于以下问题:Java Request.getType方法的具体用法?Java Request.getType怎么用?Java Request.getType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.gef.Request
的用法示例。
在下文中一共展示了Request.getType方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: performRequest
import org.eclipse.gef.Request; //导入方法依赖的package包/类
/**
* This method is used to enable direct name editing in the feature
*/
@Override public void performRequest(Request req) {
if(!editor.isLastDateSelected())
return;
if(req.getType() == RequestConstants.REQ_DIRECT_EDIT) {
}
if(req.getType() == RequestConstants.REQ_OPEN){
DwFeatureWrapped feature = (DwFeatureWrapped)getModel();
Date date = editor.getCurrentSelectedDate();
if(feature.calculateVariationTypeCircleBounds(date).contains(((SelectionRequest)req).getLocation())){
HyFeatureType type = HyEvolutionUtil.getValidTemporalElement(feature.getWrappedModelElement().getTypes(), date);
HyFeatureTypeEnum newType = type.getType() == HyFeatureTypeEnum.MANDATORY ? HyFeatureTypeEnum.OPTIONAL : HyFeatureTypeEnum.MANDATORY;
DwFeatureChangeTypeCommand command = new DwFeatureChangeTypeCommand(feature.getWrappedModelElement(), newType, editor);
editor.executeCommand(command);
this.refreshVisuals();
}else{
performDirectEditing();
}
}
}
示例2: performRequest
import org.eclipse.gef.Request; //导入方法依赖的package包/类
/**
* This method is used to enable direct name editing in the feature
*/
@Override public void performRequest(Request req) {
super.performRequest(req);
if(req.getType() == RequestConstants.REQ_OPEN){
performDirectEditing();
}
}
示例3: performRequest
import org.eclipse.gef.Request; //导入方法依赖的package包/类
/**
* This method is used to enable direct name editing in the feature
*/
@Override public void performRequest(Request req) {
if(!editor.isLastDateSelected())
return;
if(req.getType() == RequestConstants.REQ_DIRECT_EDIT) {
}
if(req.getType() == RequestConstants.REQ_OPEN){
DwFeatureWrapped feature = (DwFeatureWrapped)getModel();
Date date = editor.getCurrentSelectedDate();
if(feature.calculateVariationTypeCircleBounds(date).contains(((SelectionRequest)req).getLocation())){
HyFeatureType type = HyEvolutionUtil.getValidTemporalElement(feature.getWrappedModelElement().getTypes(), date);
type.setValidUntil(date);
HyFeatureType newType = HyFeatureFactory.eINSTANCE.createHyFeatureType();
newType.setValidSince(date);
if(type.getType() == HyFeatureTypeEnum.MANDATORY){
newType.setType(HyFeatureTypeEnum.OPTIONAL);
}else{
newType.setType(HyFeatureTypeEnum.MANDATORY);
}
feature.getWrappedModelElement().getTypes().add(newType);
this.refreshVisuals();
}else{
performDirectEditing();
}
}
}
示例4: performRequest
import org.eclipse.gef.Request; //导入方法依赖的package包/类
/**
* This method is used to enable direct name editing in the feature
*/
@Override
public void performRequest(Request req) {
if(req.getType() == RequestConstants.REQ_DIRECT_EDIT) {
}
if(req.getType() == RequestConstants.REQ_OPEN){
performDirectEditing();
}
}
示例5: performRequest
import org.eclipse.gef.Request; //导入方法依赖的package包/类
/**
* This method is used to enable direct name editing in the feature
*/
@Override
public void performRequest(Request req) {
if(req.getType() == RequestConstants.REQ_OPEN){
performDirectEditing();
}
}
示例6: performRequest
import org.eclipse.gef.Request; //导入方法依赖的package包/类
/**
* This method is used to enable direct name editing in the feature
*/
@Override public void performRequest(Request req) {
if(req.getType() == RequestConstants.REQ_DIRECT_EDIT) {
}
if(req.getType() == RequestConstants.REQ_OPEN){
performDirectEditing();
}
}
示例7: performRequest
import org.eclipse.gef.Request; //导入方法依赖的package包/类
@Override
public void performRequest(Request request) {
//React to double click
if (request.getType() == RequestConstants.REQ_OPEN) {
HyVersion version = (HyVersion)getModel();
DwFeatureModelConfiguratorEditor editor = (DwFeatureModelConfiguratorEditor)getEditor();
HyConfiguration selectedConfiguration = editor.getSelectedConfiguration();
DwConfiguratorElementHasVersionPredicate<Object> predicate = new DwConfiguratorElementHasVersionPredicate<>();
predicate.version = version;
if(!selectedConfiguration.getElements().removeIf(predicate)){
HyVersionSelected versionSelected = HyConfigurationFactory.eINSTANCE.createHyVersionSelected();
versionSelected.setSelectedVersion(version);
selectedConfiguration = checkIfConfigurationContainsOtherVersion(selectedConfiguration, version);
selectedConfiguration.getElements().add(versionSelected);
if(!HyConfigurationUtil.configurationSelects(selectedConfiguration, version.getFeature())){
DwConfiguratorEditorUtil.addFeatureToConfiguration(selectedConfiguration, version.getFeature(), editor.getCurrentSelectedDate());
}
}
editor.refreshView();
}
}
示例8: performRequest
import org.eclipse.gef.Request; //导入方法依赖的package包/类
@Override
public void performRequest(Request req) {
if (req.getType() == RequestConstants.REQ_DIRECT_EDIT) {
performDirectEditing();
}
}