Skip to content
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

It's possible to add a context menu into CodeArea? #448

Closed
ThallyssonKlein opened this issue Mar 10, 2017 · 12 comments
Closed

It's possible to add a context menu into CodeArea? #448

ThallyssonKlein opened this issue Mar 10, 2017 · 12 comments

Comments

@ThallyssonKlein
Copy link

Hi there. I'm looking for a way to display line numbers on JavaFX TextArea and they pointed me to this library. I have already implemented the CodeArea into my interface, but I discovered a problem. My TextArea had a context menu, but when I tried to add it on CodeArea, did not work. So I would to know if it's possible to do it?

@alt-grr
Copy link

alt-grr commented Mar 10, 2017

It's possibile in custom-built component from master branch

See #439 and #363

@ThallyssonKlein
Copy link
Author

Do you know to explain to me what I did wrong?

image

@JordanMartinez
Copy link
Contributor

@ThallyssonKlein It looks like your code is correct. However, could you explain why your code isn't working as expected? Is the menu not even showing up? Are you sure the code is even running?

@ThallyssonKlein
Copy link
Author

I could not even execute the code. The Eclipse is tell me that the parameter is wrong. I have analize the imports and sems that there not nothing wrong. See:

import org.fxmisc.wellbehaved.event.EventPattern;
import org.fxmisc.wellbehaved.event.InputMap;
import org.fxmisc.wellbehaved.event.Nodes;
import org.fxmisc.wellbehaved.event.template.InputMapTemplate;

@JordanMartinez
Copy link
Contributor

Strange....
Are you using Gradle to build the project? If so, perhaps you need to refresh your dependencies...

Regardless, can you post a reproducible demo? That might help us track down the issue.

@ThallyssonKlein
Copy link
Author

No, I don't using Gradle . But I'm using Maven. From what I've seen this method does not exist. So I think about the error is happening at pom.xml. Look:

<dependency>
	<groupId>org.fxmisc.richtext</groupId>
	<artifactId>richtextfx</artifactId>
	<version>0.4</version>
</dependency>
<dependency>
	<groupId>org.fxmisc.wellbehaved</groupId>
	<artifactId>WellBehavedFX</artifactId>
	<version>0.1.1</version>
</dependency>
<dependency>
	<groupId>org.fxmisc.wellbehaved</groupId>
	<artifactId>wellbehavedfx</artifactId>
	<version>0.3</version>
</dependency>

@JordanMartinez
Copy link
Contributor

WellBehavedFX is listed twice....? And RichTextFX is a much older version that doesn't use the InputMap API in WellBehavedFX 0.3...
That's interesting...

@ThallyssonKlein
Copy link
Author

I'm sorry, I don't saw it. I removed the duplicated WellBehavedFX and the issue disappear. So, what's the RichTextFX version that use the InputMap API?

@JordanMartinez
Copy link
Contributor

That was introduced in 0.7-M1, but I would use at least 0.7-M2 because of the added convenience methods as well as additional CSS.

@ThallyssonKlein
Copy link
Author

Thank you for all.

@JordanMartinez
Copy link
Contributor

If this issue is resolved, please close it @ThallyssonKlein.

@JordanMartinez
Copy link
Contributor

(wrong button pressed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants