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

Added Click to Jump feature in the basic tag info #53

Merged
merged 1 commit into from
Jan 15, 2018

Conversation

gogoprog
Copy link
Contributor

@gogoprog gogoprog commented May 5, 2017

Hello,

Here is a useful feature when quickly browsing a SWF file

I had to convert the TagInfoPanel into a JEditorPane to support html and HyperlinkListener

@honfika
Copy link
Collaborator

honfika commented May 5, 2017

I tried this pull request. It is sometimes buggy, first time when the tag info panel loads the last line has blue (transparent?) background. Check the image:
kep

And my opinion is that the previous table style was much better, this is a little bit ugly...
But the idea is very good. Is it possible to add the hyperlinks to the previous java table?

@gogoprog
Copy link
Contributor Author

gogoprog commented May 6, 2017

Hello, thanks for trying this pr.

Indeed there seems to be a rendering issue for the first display. I'll try to find a workaround for it.

My plan was to mimic the previous style but java supports only a subset of html/css which makes the job harder.

Adding the links to the previous JTable requires hacks to know if a hyperlink is clicked because the HyperLinkEvent does not exist in this case.

But I agree it should look like it was before. I have an idea to achieve that so I'll mark this PR WIP ;)

@gogoprog gogoprog changed the title Added Click to Jump feature in the basic tag info WIP: Added Click to Jump feature in the basic tag info May 6, 2017
@gogoprog gogoprog changed the title WIP: Added Click to Jump feature in the basic tag info Added Click to Jump feature in the basic tag info May 8, 2017
@gogoprog
Copy link
Contributor Author

gogoprog commented May 8, 2017

Hi,

I just updated this PR to match the previous style.
It is not 100% the same as before but it is close to it.

Let me know what do you think!

@NuclearCookie
Copy link

This looks cool! Would be nice to have this feature merged 👍

@NuclearCookie
Copy link

@jindrapetrik Any update on this?

@gogoprog
Copy link
Contributor Author

gogoprog commented Aug 4, 2017

Same question, any update?

@NuclearCookie
Copy link

@honfika

@honfika
Copy link
Collaborator

honfika commented Aug 21, 2017

Personally I don't like mixing the current "native" Java UI with HTML things, this is why I did not merge it.
I don't know what is JPEXS's opinion. Maybe he will merge it if he has no problem with it.

@jindrapetrik
Copy link
Owner

Hi, sorry for answering too late.
I tried to implement something similar based on the JTable/CellRenderer now and I confirm that it " requires hacks " for clicking the link as gogoprog said.
I think the possibility for links in taginfo panel is good idea.

For the mixing native/html: I think this new approach is better as user can select text in this table, in the previous JTable, it was not enabled/available. On the other hand, JTable had sortable columns, but I don't think anybody would want to sort columns in taginfo table. The table can have a little different look than other JTables, but it's worth it because of the links possibility.

I will appreciate an enhancement:
HTML tags for jumps should be added in the GUI part of FFDec, not in the Library.

  • instead of calling Helper.getCharacterIdsHtml in Tag class, make the taginfo value raw string (character ids joined with comma as before)
  • parse this value in the GUI (for example, based on taginfo name - only "neededCharacters", "dependentCharacters") and add the tags in the GUI

Is it possible to update it? (Do you still work with FFDec?)

+Do not forget to remove System.out.println(result); from TagInfoPanel

@gogoprog
Copy link
Contributor Author

Thanks for your feedback!

I'll update it soon and yes I'm still using it ;)

@jindrapetrik jindrapetrik changed the base branch from master to dev January 14, 2018 14:17
@jindrapetrik
Copy link
Owner

I have switched pull request target branch, it should be dev branch instead of master branch. I hope it didn't break anything for you...

@gogoprog gogoprog force-pushed the feature/click-to-jump branch 2 times, most recently from 31dd576 to dd91e3b Compare January 15, 2018 13:04
@gogoprog gogoprog force-pushed the feature/click-to-jump branch from dd91e3b to 57725f8 Compare January 15, 2018 13:11
@gogoprog
Copy link
Contributor Author

I updated it, let me know if something is wrong..

@jindrapetrik
Copy link
Owner

Looks okay to me.
Few minor notices exist in the code like comparing strings using == operator,
I will fix them after merging.
Thank you very much for your contribution!

@jindrapetrik jindrapetrik merged commit cad312d into jindrapetrik:dev Jan 15, 2018
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

Successfully merging this pull request may close these issues.

4 participants