当前位置: 首页>>代码示例>>Java>>正文


Java JKindResult类代码示例

本文整理汇总了Java中jkind.api.results.JKindResult的典型用法代码示例。如果您正苦于以下问题:Java JKindResult类的具体用法?Java JKindResult怎么用?Java JKindResult使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


JKindResult类属于jkind.api.results包,在下文中一共展示了JKindResult类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setInput

import jkind.api.results.JKindResult; //导入依赖的package包/类
public void setInput(JKindResult result, AgreeRenaming renaming) {
	for (Control control : composite.getChildren()) {
		control.dispose();
	}
	table = new Table(composite, SWT.FULL_SELECTION);

	List<String> raw = candidates(result, renaming);
	
	createColumns(raw, renaming);
	createContent(result, raw);
	packColumns();

	table.setHeaderVisible(true);
	table.setLinesVisible(true);
	composite.layout(true);
}
 
开发者ID:smaccm,项目名称:smaccm,代码行数:17,代码来源:AgreeTraceabilityMatrixView.java

示例2: showView

import jkind.api.results.JKindResult; //导入依赖的package包/类
private void showView(final JKindResult result, final Layout layout) {
	window.getShell().getDisplay().syncExec(new Runnable() {
		@Override
		public void run() {
			try {
				JKindResultsView page = (JKindResultsView) window.getActivePage().showView(
						JKindResultsView.ID);
				page.setInput(result, layout);
			} catch (PartInitException e) {
				e.printStackTrace();
			}
		}
	});
}
 
开发者ID:agacek,项目名称:jkind-xtext,代码行数:15,代码来源:RunJRealizabilityHandler.java

示例3: executeOnEditor

import jkind.api.results.JKindResult; //导入依赖的package包/类
@Override
protected Object executeOnEditor(ExecutionEvent event) {
	window = HandlerUtil.getActiveWorkbenchWindow(event);
	if (window == null) {
		return null;
	}

	final XtextEditor xtextEditor = EditorUtils.getActiveXtextEditor(event);
	if (xtextEditor == null) {
		return null;
	}

	FileEditorInput input = (FileEditorInput) xtextEditor.getEditorInput();
	final java.io.File fileOnDisk = input.getFile().getLocation().toFile();

	if (xtextEditor.isDirty()) {
		if (MessageDialog.openConfirm(window.getShell(), "Save and Run JKind", "The file "
				+ input.getName() + " has unsaved changes. Save file and continue?")) {
			xtextEditor.doSave(null);
		} else {
			return null;
		}
	}

	WorkspaceJob job = new WorkspaceJob("JKind Analysis") {
		@Override
		public IStatus runInWorkspace(final IProgressMonitor monitor) {
			activateTerminateHandler(monitor, this);
			JKindResult result = initializeJKindResult(xtextEditor);
			if (result == null) {
				return errorStatus("Lustre file contains errors");
			}
			return runJob(fileOnDisk, result, monitor);
		}
	};

	job.schedule();
	return null;
}
 
开发者ID:agacek,项目名称:jkind-xtext,代码行数:40,代码来源:RunJKindHandler.java

示例4: initializeJKindResult

import jkind.api.results.JKindResult; //导入依赖的package包/类
private JKindResult initializeJKindResult(XtextEditor xtextEditor) {
	return xtextEditor.getDocument().readOnly(new IUnitOfWork<JKindResult, XtextResource>() {
		@Override
		public JKindResult exec(XtextResource resource) throws Exception {
			File file = (File) resource.getContents().get(0);
			return initializeJKindResult(file);
		}
	});
}
 
开发者ID:agacek,项目名称:jkind-xtext,代码行数:10,代码来源:RunJKindHandler.java

示例5: testSuiteFromJKindResult

import jkind.api.results.JKindResult; //导入依赖的package包/类
public static TestSuite testSuiteFromJKindResult(JKindResult result, String implUnderTest, String name, String description) {
	List<TestCase> tests = new ArrayList<>();
	for (PropertyResult pr : result.getPropertyResults()) {
		if (pr.getProperty() instanceof InvalidProperty) {
			InvalidProperty invalidProp = (InvalidProperty)pr.getProperty();
			tests.add(new TestCase(pr.getName(), "", invalidProp.getCounterexample()));
		}
	}
	return new TestSuite(implUnderTest, name, description, tests, TestSuite.State.INSTANTIATED); 
}
 
开发者ID:smaccm,项目名称:smaccm,代码行数:11,代码来源:TestSuiteUtils.java

示例6: setInput

import jkind.api.results.JKindResult; //导入依赖的package包/类
public void setInput(TestSuite suite, final AgreeResultsLinker linker, final JKindResult result) {
	this.suite = suite;
	table.setInput(suite);
       menuListener.setLinker(linker);
       menuListener.setAnalysisResult(result);
       this.setPartName("Test Suite: " + result.getName() + " [" + suite.getSystemImplUnderTest() + "]");
}
 
开发者ID:smaccm,项目名称:smaccm,代码行数:8,代码来源:TestSuiteView.java

示例7: addOpenTestSuiteViewMenu

import jkind.api.results.JKindResult; //导入依赖的package包/类
private void addOpenTestSuiteViewMenu(IMenuManager manager, AnalysisResult result) {

    	if (result instanceof JKindResult) {
    		JKindResult jresult = (JKindResult)result;
	    	manager.add(new Action("View/Modify Test Suite") {
	            @Override
	            public void run() {
	                viewTestSuite(jresult, linker);
	            }
	        });
    	}
    }
 
开发者ID:smaccm,项目名称:smaccm,代码行数:13,代码来源:TestCaseGeneratorMenuListener.java

示例8: viewTestSuite

import jkind.api.results.JKindResult; //导入依赖的package包/类
private void viewTestSuite(JKindResult result, AgreeResultsLinker linker) {
TestSuite testSuite = TestSuiteUtils.
		testSuiteFromJKindResult(result, 
				linker.getComponent(result).getQualifiedName(), result.getName(), result.getText());
  	try {
      	TestSuiteView tcView = (TestSuiteView) window.getActivePage().showView(
      			TestSuiteView.ID);
          tcView.setInput(testSuite, linker, result);
          tcView.setFocus();
      } catch (PartInitException e) {
          e.printStackTrace();
      }

  }
 
开发者ID:smaccm,项目名称:smaccm,代码行数:15,代码来源:TestCaseGeneratorMenuListener.java

示例9: extractJKindResult

import jkind.api.results.JKindResult; //导入依赖的package包/类
protected JKindResult extractJKindResult(AnalysisResult result) {
	if (result instanceof JKindResult) {
		return (JKindResult)result;
	} else if (result instanceof CompositeAnalysisResult) {
		CompositeAnalysisResult comp = (CompositeAnalysisResult)result;
		if (comp.getChildren().size() == 1) {
			return extractJKindResult(comp.getChildren().get(0));
		}
	}
	throw new TcgException("Unexpected jkind 'result' type when opening test suite");
}
 
开发者ID:smaccm,项目名称:smaccm,代码行数:12,代码来源:OpenHandler.java

示例10: showSuiteView

import jkind.api.results.JKindResult; //导入依赖的package包/类
private void showSuiteView(final TestSuite suite, final AgreeResultsLinker linker, final JKindResult result) {
	syncExec(() -> {
		try {
			TestSuiteView page = (TestSuiteView) getWindow().getActivePage()
					.showView(TestSuiteView.ID);
			page.setInput(suite, linker, result);
		} catch (PartInitException e) {
			e.printStackTrace();
		}
	});
}
 
开发者ID:smaccm,项目名称:smaccm,代码行数:12,代码来源:OpenHandler.java

示例11: getMultiStatus

import jkind.api.results.JKindResult; //导入依赖的package包/类
public static TcgMultiStatus getMultiStatus(AnalysisResult result) {
	if (result instanceof CompositeAnalysisResult) {
		return new TcgMultiStatus(((CompositeAnalysisResult) result).getMultiStatus());
	} else if (result instanceof JKindResult) {
		return new TcgMultiStatus(((JKindResult) result).getMultiStatus());
	} else {
		return null;
	}
}
 
开发者ID:smaccm,项目名称:smaccm,代码行数:10,代码来源:TcgResultsUtil.java

示例12: addTraceabilityMatrixMenu

import jkind.api.results.JKindResult; //导入依赖的package包/类
private void addTraceabilityMatrixMenu(IMenuManager manager, AnalysisResult result) {

        IPreferenceStore prefs = Activator.getDefault().getPreferenceStore();
        if (prefs.getString(PreferenceConstants.PREF_MODEL_CHECKER)
                .equals(PreferenceConstants.MODEL_CHECKER_JKIND) &&
            prefs.getBoolean(PreferenceConstants.PREF_SUPPORT) &&
            result instanceof JKindResult) {
        	JKindResult jresult = (JKindResult)result;
        	
        	Set<String> reqs = new HashSet<String>(); 
        	for (PropertyResult pr : jresult.getPropertyResults()) {
    			if (pr.getProperty() instanceof ValidProperty) {
    				ValidProperty vp = (ValidProperty) pr.getProperty();
    				Set<String> ivc = vp.getIvc();
    				if (ivc != null && !ivc.isEmpty()) {
    					reqs.addAll(ivc);
    				}
    			}
        	}
        	String nodeName = linker.getComponent(result).getName(); 
        	manager.add(
        			new Action("View traceability matrix for " + nodeName) {
        				public void run() {
        					viewTraceabilityMatrix(jresult, reqs);
        				}
        			});
        }			
    }
 
开发者ID:smaccm,项目名称:smaccm,代码行数:29,代码来源:AgreeMenuListener.java

示例13: viewTraceabilityMatrix

import jkind.api.results.JKindResult; //导入依赖的package包/类
private void viewTraceabilityMatrix(
 		JKindResult result, 
 		Set<String> reqs) {

 	try {
AgreeTraceabilityMatrixView matrix = 
		(AgreeTraceabilityMatrixView) window.getActivePage().showView(
				AgreeTraceabilityMatrixView.ID);
matrix.setInput(result, (AgreeRenaming)linker.getRenaming(result));
      matrix.setFocus();
  } catch (PartInitException e) {
      e.printStackTrace();
  }
 }
 
开发者ID:smaccm,项目名称:smaccm,代码行数:15,代码来源:AgreeMenuListener.java

示例14: usedCandidates

import jkind.api.results.JKindResult; //导入依赖的package包/类
public List<String> usedCandidates(JKindResult result) {
   	Set<String> reqs = new HashSet<String>();
	for (PropertyResult pr : result.getPropertyResults()) {
		if (pr.getProperty() instanceof ValidProperty) {
			ValidProperty vp = (ValidProperty) pr.getProperty();
			Set<String> ivc = vp.getIvc();
			if (ivc != null && !ivc.isEmpty()) {
				reqs.addAll(ivc);
			}
		}
   	}
	return reqs.stream().collect(Collectors.toList()); 
}
 
开发者ID:smaccm,项目名称:smaccm,代码行数:14,代码来源:AgreeTraceabilityMatrixView.java

示例15: candidates

import jkind.api.results.JKindResult; //导入依赖的package包/类
public List<String> candidates(JKindResult result, AgreeRenaming renaming) {
	if (showUnused) {
		return renaming.getSupportRefStrings().keySet().stream().collect(Collectors.toList());
	} else {
		return usedCandidates(result); 
	}
}
 
开发者ID:smaccm,项目名称:smaccm,代码行数:8,代码来源:AgreeTraceabilityMatrixView.java


注:本文中的jkind.api.results.JKindResult类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。