This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ strace ssh-agent -d | |
| 2 2 [main] ssh-agent (5952) ********************************************** | |
| 145 147 [main] ssh-agent (5952) Program name: C:\Program Files\Git\usr\bin\ssh-agent.exe (windows pid 5952) | |
| 90 237 [main] ssh-agent (5952) OS version: Windows NT-6.3 | |
| 89 326 [main] ssh-agent (5952) ********************************************** | |
| 173 499 [main] ssh-agent (5952) sigprocmask: 0 = sigprocmask (0, 0x0, 0x1802DF0A8) | |
| 253 752 [main] ssh-agent 5952 open_shared: name shared.5, n 5, shared 0x180030000 (wanted 0x180030000), h 0x64, *m 6 | |
| 108 860 [main] ssh-agent 5952 user_heap_info::init: heap base 0x600000000, heap top 0x600000000, heap size 0x20000000 (536870912) | |
| 121 981 [main] ssh-agent 5952 open_shared: name S-1-5-21-3261782737-4049003655-1400219572-1001.1, n 1, shared 0x180020000 (wanted 0x180020000), h 0x68, *m 6 | |
| 91 1072 [main] ssh-agent 5952 user_info::create: opening user shared for 'S-1-5-21-3261782737-4049003655-1400219572-1001' at 0x1800200 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Query based features | |
| private IncqueryFeatureHandler numberOfSchoolsHandler; | |
| private IncqueryFeatureHandler lastYearHandler; | |
| private IncqueryFeatureHandler teachersWithMostCourses; | |
| /** | |
| * <!-- begin-user-doc --> | |
| * <!-- end-user-doc --> | |
| */ | |
| protected SchoolImpl() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public String execute(String modelPath, String patternFQN) { | |
| ResourceSet resourceSet = new ResourceSetImpl(); | |
| URI fileURI = URI.createFileURI(modelPath); | |
| Resource resource = resourceSet.getResource(fileURI, true); | |
| if (resource != null) { | |
| try { | |
| IncQueryMatcher matcher = MatcherFactoryRegistry.getMatcherFactory(patternFQN).getMatcher(resource); | |
| Collection<IPatternMatch> matches = matcher.getAllMatches(); | |
| for (IPatternMatch match : matches) { | |
| IncQueryEngine.getDefaultLogger().logError(match.prettyPrint()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pattern AtLeastThreeAttributes(Cls : EClass) = { | |
| M == count find ClassAttributes(Cls,Attr); | |
| check((M as Integer) > 2); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pattern ClassWithGivenNameAndHasAttribute(Cls : EClass) = { | |
| find EClassWithGivenName(Cls); | |
| find ClassAttributes(Cls,Attr); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pattern ClassAttributeNames(Cls,Name) = { | |
| EClass(Cls); | |
| EString(Name); | |
| // since eAttributes will refer to EAttribute, we can use its name feature | |
| EClass.eAttributes.name(Cls,Name); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| IEditorPart editorPart = pm.getParent().getParent().getEditorPart(); | |
| if(editorPart.getSite().getPage().getActiveEditor() != editorPart) { | |
| //bring editor part to top | |
| editorPart.getSite().getPage().bringToTop(editorPart); // this should make it active as well, otherwise infinite execption | |
| IHandlerService handlerService = (IHandlerService) editorPart.getSite().getService(IHandlerService.class); | |
| try { | |
| handlerService.executeCommand(CommandConstants.SHOW_LOCATION_COMMAND_ID, null); | |
| return; | |
| } catch (Exception e) { | |
| IncQueryEngine.getDefaultLogger().logError("Exception when activating show location!", e); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @QueryBasedFeature(feature = "jobs") | |
| pattern ChecklistEntryJobCorrespondence(CLE : ChecklistEntry, Job : Job) = { | |
| Job.name(Job,JobName); | |
| System.name(System,SysName); | |
| Job.runsOn(Job,System); | |
| ChecklistEntry.jobPaths(CLE,JobPath); | |
| check((JobPath as String).equals((SysName as String).concat('/').concat(JobName as String))); | |
| } | |
| @QueryBasedFeature(feature = "task") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Test | |
| def shortTest(){ | |
| val patternModel = parseHelper.parse(' | |
| import "http://www.eclipse.org/viatra2/patternlanguage/core/PatternLanguage" | |
| pattern resolutionTest(Name) = { | |
| Pattern(Name); | |
| } ') as PatternModel | |
| patternModel.assertMatchResults("uri/to/test/expected") | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.eclipse.viatra2.patternlanguage.eMFPatternLanguage.PatternModel | |
| import org.eclipse.viatra2.patternlanguage.core.patternLanguage.PatternLanguageFactory | |
| import org.eclipse.viatra2.patternlanguage.eMFPatternLanguage.EMFPatternLanguageFactory | |
| import org.eclipse.emf.ecore.EcorePackage | |
| import org.junit.Test | |
| import org.junit.runner.RunWith | |
| import org.eclipse.xtext.junit4.XtextRunner | |
| import org.eclipse.xtext.junit4.InjectWith | |
| import org.eclipse.viatra2.emf.incquery.testing.core.injector.EMFPatternLanguageInjectorProvider | |
| import org.eclipse.emf.common.util.URI |
OlderNewer