tthuem / variantsync Goto Github PK
View Code? Open in Web Editor NEWAutomating the synchronization of software variants
License: GNU Lesser General Public License v3.0
Automating the synchronization of software variants
License: GNU Lesser General Public License v3.0
There are problems with opening configurations in the old FeatureIDE version. Some features are simply not selected, which is confusing for the user.
VariantSync should support multiple feature info projects laying in one workspace.
Source-focused view enhancements:
When doing a manual sync, the compare view opens, but no items exist under Compilation Unit.
Also, the cancel action closes the merge view but also marks the change as merged.
For new research projects, we have to abstract from software projects to be able to compare variants and their code fragments.
Therefore, as a first step we want to represent projects and software artefacts in a tree structure.
The following is a first draft for how such an abstract syntax tree (AST) structure could look like:
class AST<Grammar, Value> {
int UUID;
Grammar type;
Value value;
List<AST<Grammar, Value>> children = new ArrayList<>();
/// getters, setters, and utility methods here
}
where a Grammar
would be an enum over grammar symbols of for example Java or C++ grammar.
The grammar, this describes the type of a node in the tree.
For now, the goal is to stick to a line-based structure such as used in git diff
.
Thus, an initial grammar would be:
public enum LineGrammar {
Directory, File, Line
}
Thus, we would distinguish between directories, files and lines of source code in that file.
For example, the following would be the way to construct a tree for a java Hello World
program manually:
AST<LineGrammar, String> srcDir = new AST<>(LineGrammar.Directory, "src");
AST<LineGrammar, String> mainJava = new AST<>(LineGrammar.File, "Main.java");
srcDir.children.add(mainJava);
mainJava.children.addAll(Arrays.asList(
new AST<>(LineGrammar.Line, "public class Main {"),
new AST<>(LineGrammar.Line, " public static void main(String[] args)"),
new AST<>(LineGrammar.Line, " System.out.println(\"Hello World\");"),
new AST<>(LineGrammar.Line, " }"),
new AST<>(LineGrammar.Line, "}")));
This tree structure should be part of the VariantSyncCoreLibrary from issue #49.
The line-based diff should be taken over from the old to the new version
The ASTs from issue #50 have to be serializable sucht that we can compare them across sessions and between tools.
Therefore, we agreed on a common JSON format:
{
"uuid" : 1,
"value" : "some string",
"grammar_type" : "grammar type as string",
"children" : [
"... further nodes in recursive structure"
]
}
So the goal is, to implement and exporter and an importer to serialize ASTs into that format.
Changes in the color dialog are not saved.
Like in FeatureIDE, we should support colors for feature expressions.
Potentially because there was no variantSyncInfo project.
java.lang.NullPointerException
at de.ovgu.variantsync.ui.view.mergeprocess.SourceFocusedView.createPartControl(SourceFocusedView.java:70)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:151)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityView.createPartControl(CompatibilityView.java:143)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:341)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:54)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:966)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:931)
at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:151)
at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:375)
at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:294)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:105)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:74)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:56)
at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:129)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:975)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:651)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$1.run(PartRenderingEngine.java:536)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:520)
at org.eclipse.e4.ui.workbench.renderers.swt.ElementReferenceRenderer.createWidget(ElementReferenceRenderer.java:70)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:975)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:651)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:757)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:728)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:722)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:706)
at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.showTab(StackRenderer.java:1317)
at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer$1.handleEvent(LazyStackRenderer.java:72)
at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:4813)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211)
at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36)
at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201)
at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94)
at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60)
at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:173)
at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:617)
at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:581)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:770)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:744)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:682)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:677)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1205)
at org.eclipse.ui.internal.WorkbenchPage.showPart(WorkbenchPage.java:1283)
at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1274)
at org.eclipse.ui.internal.WorkbenchPage$12.run(WorkbenchPage.java:4316)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:4312)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:4292)
at org.eclipse.ui.handlers.ShowViewHandler.openView(ShowViewHandler.java:132)
at org.eclipse.ui.handlers.ShowViewHandler.openOther(ShowViewHandler.java:110)
at org.eclipse.ui.handlers.ShowViewHandler.execute(ShowViewHandler.java:77)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:295)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:54)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:282)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:264)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:494)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:488)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:353)
at org.eclipse.ui.internal.ShowViewMenu$3.run(ShowViewMenu.java:147)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:473)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565)
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:397)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4410)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4228)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3816)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:687)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:604)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
at org.eclipse.equinox.launcher.Main.main(Main.java:1492)
To analyze source code files we have to be able to parse text files to our simple abstract syntax trees from issue #50.
The idea is to create parser with the following interface
public static AST<LineGrammar, String> parseDirectory(java.nio.Path path) {
/**
*Traverse the given directory recursively and read the lines of all non-binary files (e.g., .java, .cpp, .txt, ...).
* Create a node in the tree for each directory, file, and the lines in that file,
* such that the directory structure is mirrored in the returned tree.
*/
}
The source- and target-focused views should be resize properly so that the synchronization button is visible on smaller screens.
Reconsider if the variant nature is still needed or if it can be removed.
A constructor of constraint editor takes an IConstraint as a parameter so the constraint editor needs an overhaul to support different types of elements. An interface should be sufficient here, but the classes should be created and changed in agreement with the @FeatureIDE developers.
Changing a feature expression which is already in use leads to some unresolved questions.
For the time being, the feature expressions should be read-only when in use.
The models could be synchronized, when it gives an advantage.
Colorings should be synchronized for visualization purposes.
Currently, feature traces are implemented as de.tubs.variantsync.core.utilities.IVariantSyncMarker
. Such a marker represents an individual mapping for a single chunk of text in a text file (?). To this end, it is represented by an int offset
describing the index in the text of the document at which the mapping begins and an int length
and the corresponding feature formula (given as a string).
To alternatively replace this (deprecated) representation of feature traces, we first have to introduce interfaces to make the GUI independent from the actual representation of feature traces.
Therefore, follow these steps:
AST<LineGrammar, String>
. (Later we want to generalize this to AST<G,V>
but for now we should keep things simple).In VariantSync the implementation of a page of the FeatureContextView does not work anymore. This issue tracks the changes.
#45
Currently, all features are automatically valid feature expressions. Features which are abstract, hidden, etc. should be handled somewise.
When the feature info project is closed, deleted or missing in any other way, there must be some kind of error handling e.g. show an error marker/popup.
Opening a project should also be possible.
Adding a project should also initialize the projects with feature context expressions etc.
Sometimes a change is shown even though there is not a single class listed.
This is a long term issue.
Core functionalities of VariantSync that are independent from the IDE should be developed independently in a dedicated library.
Thus, the plan is to create a new java library (preferrably as a Maven project of archetype maven-archetype-quickstart in this repository) that can be included as a jar file.
In the later future, core library should hold unified data structures and functionality for
So the next steps would be:
de.variantsync.core
.In VariantSync there are usages of deprecated Interfaces (IPersistentFormat, APersistentFormat, CoreExtensionLoader, IExtensionLoader). The purpose of this issue is tu track the changes in order to renew the old usages
#45
This would make renaming possible but could lead to unwanted behavior. If this gives an advantage should be checked.
Currently, VariantSync only runs with very old versions of Eclipse and FeatureIDE due to numerous changes in the FeatureIDE library.
VariantSync should be upgraded to run with the newest Version v3.7.0 (https://featureide.github.io/) of FeatureIDE.
Which factory should be used when two factories can be used for a specific file? This should be settable within the preferences.
Changed a line and then changed it again under the same context. Only the first change was propagated.
The small overlay only appears after pressing F5 (i.e., manual refresh).
The following message is non-sense, as the feature model is essentially not changed due to feature expressions. Later on, we could include similar checks as for ifdefs (e.g., dead code detection).
What happens when to feature expressions when the feature model evolves, like deletion etc..
In the actual VariantSync version there are many usages and implementations which use deprecated methods.
In a newer version there was a switch from using IFile to Path, so we need to update this
#45 bug
We should discuss and search for a method to handle files and their changes in variants. Git or Mercurial could be a solution. Needs still further investigation and requires an interface on variantsync's side.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.