-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mka/elk properties #110
Mka/elk properties #110
Conversation
...e.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/DefaultBlacklistedProperties.java
Outdated
Show resolved
Hide resolved
...e.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/DefaultBlacklistedProperties.java
Outdated
Show resolved
Hide resolved
...e.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/DefaultBlacklistedProperties.java
Outdated
Show resolved
Hide resolved
@@ -98,6 +98,9 @@ | |||
|
|||
/** name of the 'preservedProperties' element. */ | |||
private static final String PRESERVED_PROPERTIES = "preservedProperties"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the preserved properties are no longer in use now, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They're still used for copying some stuff from the elkgraph to the KGraph apparently.
Line 459 in 37653b1
List<IProperty<?>> propertiesToPreserve = KlighdDataManager.getInstance().getPreservedProperties(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I think you removed the only reference to it by introducing the blacklist and copying all other properties such as desiredPostion, layerId, etc...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, is this still needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently the only remaining reference is in the KGraphMerger. It's used there in conjunction with some property removal process to filter which properties should be copied from an elkgraph to a kgraph. This seems to be a separate thing from where preservedProperties have now been removed from and I'm not sure what the reasoning behind the filtering there is. To me it looks like preservedProperties were overloaded in their purpose before. I don't know what the right way to change KGraphMerger is. If that is solved, then yes preservedProperties and the related classes can be removed.
...e.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/DefaultBlacklistedProperties.java
Outdated
Show resolved
Hide resolved
var properties = kNode.allProperties; | ||
var propertyKeys = properties.keySet; | ||
var blackList = KlighdDataManager.instance.blacklistedProperties; | ||
for (key : propertyKeys) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For better efficiency here you could just run through the properties instead of only the keys. Removes the need to search through the properties via get(key)
for every key
@@ -237,6 +240,9 @@ public static KlighdDataManager getInstance() { | |||
|
|||
/** the properties that shall be preserved from the layout graph to the kgraph */ | |||
private final List<IProperty<?>> preservedProperties = Lists.newArrayList(); | |||
|
|||
/** the properties that are not allowed to be preserved */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preserved for what? The context is missing here in this generic class
@@ -670,6 +684,18 @@ public KlighdDataManager registerPreservedProperties(Iterable<IProperty<?>> pres | |||
} | |||
return this; | |||
} | |||
|
|||
public KlighdDataManager registerBlacklistedProperty(IProperty<?> blacklistedProperty) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment public API
|
||
|
||
/** | ||
* Returns the list of registered properties that have been blacklisted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blacklisted for what? The context is missing here in this generic class
…culatedDecorationMap for now)
...ns/de.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/utils/KGraphMappingUtil.xtend
Outdated
Show resolved
Hide resolved
|
||
for (propertyKVPair : properties.entrySet()) { | ||
if (!containsPropertyWithId(blackList, propertyKVPair.key.id)) { | ||
// TODO: remove this check once https://github.com/kieler/semantics/pull/13 has been merged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we want to remove this before the next release and not after this was merged. (also see cases below)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also in EObjectSerializer
@@ -77,5 +77,12 @@ | |||
</provider> | |||
|
|||
</extension> | |||
<extension |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need extension points @NiklasRentzCAU ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. If something will be written to this setup (for example actions, syntheses etc. like in semantics) it will only be executed in Eclipse when used as an extension point. That was the main reason why we have this single programmatic extension mechanism now, that needs to be registered once as a Java Service and Eclipse extension point
@@ -98,6 +98,9 @@ | |||
|
|||
/** name of the 'preservedProperties' element. */ | |||
private static final String PRESERVED_PROPERTIES = "preservedProperties"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, is this still needed?
Server-side changes to support changes proposed in klighd-vscode.
Additionally changes in semantics are necessary.