question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom Snippet support in Java editor

See original GitHub issue

What do you think about some way of autoproxing of implementation methods in entities, additionally to snippets? Wouldn’t it simplify snippet writing, because basic Netbeans capabilities to write code could be used in this case?

Example

Assuming there is entity ‘SomeEntity’, and package contains hand-written (possible package protected) ‘SomeEntityImpl’ class with static implemetation methods.

class SomeEntityImpl {
    public static void oneMethod(SomeEntity someEntity);
    public static boolean secondMethod(SomeEntity someEntity, boolean param);
}

leads to code proxy generation in SomeEntity class:

public class SomeEntity {
    ....
    public void oneMethod() {
        SomeEntityImpl.oneMethod(this);
    }
    
    public boolean secondMethod(boolean param) {
        return SomeEntityImpl.secondMethod(this, param);
    }    
}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
slavb18commented, Jul 11, 2018

Another option is to use some annotation or comment block like

/* BEGIN HAND-WRITTEN-CODE / {there is code which is not overwritten from jeddict. E.g. jeddict copies this code and writes back. But what to do with imports on top of file, they will be lost, if Jedict not copies them} / END HAND-WRITTEN-CODE */

0reactions
slavb18commented, Aug 21, 2018

Thank You!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Snippets in Visual Studio Code
Snippets in Visual Studio Code. Code snippets are templates that make it easier to enter repeating code patterns, such as loops or conditional-statements....
Read more >
How to Create Your Own Custom Code Snippets Right in Your ...
Creating your own custom snippet is quite easy. And with the help of another tool called Snippet Generator (which I will show you...
Read more >
Add Custom Code Snippets in VS Code | Bits and Pieces
Adding Custom Snippet · Start by going to the User Snippets section under Code > Preferences > User Snippets (on a Mac). ·...
Read more >
Visual snippet editor - IBM
The visual snippet editor is a diagrammatic programming environment that you use to graphically create and manipulate Java code.
Read more >
Creating Java code snippets - Informatica Documentation
Inputs, Outputs, and APIs tabs. Use these tabs to add input and output fields as variables and to call API methods in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found