-
Notifications
You must be signed in to change notification settings - Fork 57
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
Added procedure and function grouping in metadata view. #78
base: master
Are you sure you want to change the base?
Conversation
import com.neueda.jetbrains.plugin.graphdb.jetbrains.ui.datasource.metadata.tree.MutableTreeNodeProducers; | ||
import com.neueda.jetbrains.plugin.graphdb.jetbrains.ui.datasource.metadata.tree.Root; | ||
import com.neueda.jetbrains.plugin.graphdb.jetbrains.ui.datasource.metadata.tree.TreeNodeDirectory; | ||
import com.neueda.jetbrains.plugin.graphdb.jetbrains.ui.datasource.tree.*; |
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.
Please don't use imports with '*'. Use only imports what you need
public Directory getDirectory(String name) { | ||
return directories.computeIfAbsent( | ||
name, | ||
(k) -> new Directory(k, directoryProducer, functionProducer) |
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.
what is 'k'?
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.
'k' stands for key, however I changed it to 'newName' for more understanding
|
||
class Leaf implements TreeNode { | ||
private final String name; | ||
private Function<TreeNode, DefaultMutableTreeNode> mutableTreeNodeProducer; |
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.
mutableTreeNodeProducer should be final
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.
changed
); | ||
} | ||
|
||
private MutableTreeNodeProducers() { |
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.
Constructor should be in the top of the class
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.
changed
public Directory getDirectory(String name) { | ||
return directories.computeIfAbsent( | ||
name, | ||
(k) -> new Directory(k, directoryProducer, functionProducer) |
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 can't understand what is 'k'. Please use full names for the variables
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.
'k' stands for key, however I changed it to 'newName' for more understanding
|
||
public interface TreeNode { | ||
|
||
public String getName(); |
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.
Access modifier is 'public' is redudant here. In interfaces access modifier by default is public
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.
changed
|
||
public String getName(); | ||
|
||
public DefaultMutableTreeNode getMutableTreeNode(); |
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.
Access modifier is 'public' is redudant here. In interfaces access modifier by default is public
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.
changed
|
||
public interface TreeNodeDirectory extends TreeNode { | ||
|
||
public void addLeaf(String name); |
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.
Access modifier is 'public' is redudant here. In interfaces access modifier by default is public
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.
changed
|
||
public void addLeaf(String name); | ||
|
||
public TreeNodeDirectory getDirectory(String name); |
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.
Access modifier is 'public' is redudant here. In interfaces access modifier by default is public
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.
changed
- code style changed
d5dacb2
to
3dd24e6
Compare
No description provided.