Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

fix jetbrains recents parsing for 2019.3 eap#70

Merged
ManuelSchneid3r merged 2 commits intoalbertlauncher:devfrom
iyzana:fix-jetbrains-recents-parsing
Nov 8, 2020
Merged

fix jetbrains recents parsing for 2019.3 eap#70
ManuelSchneid3r merged 2 commits intoalbertlauncher:devfrom
iyzana:fix-jetbrains-recents-parsing

Conversation

@iyzana
Copy link
Copy Markdown
Contributor

@iyzana iyzana commented Oct 10, 2019

No description provided.

Copy link
Copy Markdown
Contributor

@mqus mqus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you maybe comment on why this doesn't work anymore?

Apart from that, this looks good to me, Thank you!

@iyzana
Copy link
Copy Markdown
Contributor Author

iyzana commented Oct 10, 2019

The EAP version started generating xml that looks like this:

...
<RecentProjectMetaInfo projectWorkspaceId="...">
  <option name="binFolder" value="$APPLICATION_HOME_DIR$/bin" />
  <option name="build" value="IU-193.3519.25" />
  <option name="buildTimestamp" value="1568822400642" />
  <option name="eap" value="true" />
  <frame x="17" y="17" width="933" height="1046" extendedState="6" />
  <option name="productionCode" value="IU" />
  <option name="projectOpenTimestamp" value="1569415744426" />
</RecentProjectMetaInfo>
...

and the frame key does not have a name attribute, so the script would fail.

@mqus
Copy link
Copy Markdown
Contributor

mqus commented Oct 10, 2019

That explains it, thanks!

@mqus
Copy link
Copy Markdown
Contributor

mqus commented Nov 24, 2019

(In case you are wondering why nothing is happening here, I don't have any merge rights, so we have to wait for @ManuelSchneid3r to merge this)

@iyzana
Copy link
Copy Markdown
Contributor Author

iyzana commented Nov 24, 2019

i figured, i've had #64 open for ~7 months now

@Sharsie
Copy link
Copy Markdown
Contributor

Sharsie commented Jan 6, 2020

@iyzana thanks for this, before it gets merged, it may be safer to just check for existence of the attribute, rather than the tag name (in case JB decides to use <option> without a name for something else in the future)
something along the lines of

-                if o.tag == 'option' and o.attrib["name"] == 'projectOpenTimestamp':
+                if 'name' in o.attrib and o.attrib["name"] == 'projectOpenTimestamp':

or a combination of both

@iyzana
Copy link
Copy Markdown
Contributor Author

iyzana commented Jan 7, 2020

@Sharsie yeah, probably a good idea. done

Copy link
Copy Markdown

@felipeassoline felipeassoline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works here!!! Thanks for this change :)

@mqus
Copy link
Copy Markdown
Contributor

mqus commented May 14, 2020

Short notice for everyone who is interested: I made a few more fixes to the plugin and am now hosting the plugin here: https://github.com/mqus/jetbrains-albert-plugin

@ManuelSchneid3r ManuelSchneid3r force-pushed the dev branch 2 times, most recently from 686718e to a1ab7f4 Compare November 8, 2020 22:18
@ManuelSchneid3r ManuelSchneid3r merged commit 700b3be into albertlauncher:dev Nov 8, 2020
@ManuelSchneid3r
Copy link
Copy Markdown
Member

Short notice for everyone who is interested: I made a few more fixes to the plugin and am now hosting the plugin here: https://github.com/mqus/jetbrains-albert-plugin

please upstream. i you like owning your own repo you could also make a submodule

@iyzana iyzana deleted the fix-jetbrains-recents-parsing branch November 9, 2020 18:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

6 participants