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

can I use with other file ? #107

Open
lotte-medic opened this issue Aug 5, 2020 · 3 comments
Open

can I use with other file ? #107

lotte-medic opened this issue Aug 5, 2020 · 3 comments

Comments

@lotte-medic
Copy link

We use mybatis. but sql file extension is not XML.
We use extension SQLX like a test.sqlx. but Content type is XML file.

Can We use mybatipse plug-in ?
Do I have to setting something on Eclipse?

@harawata
Copy link
Member

harawata commented Aug 5, 2020

Hello @lotte-medic ,

There might be a good reason, but using a custom extension may make your development difficult.
I would recommend using the default extension (i.e. .xml) if that's possible.
Even MyBatis itself does not support custom extension, I think.

Anyway, if you really have to use .sqlx, try the following steps:

  1. From 'Eclipse' menu, open 'Preferences...'.
  2. In the left navigation area, choose 'General' > 'Content Types'.
  3. In the 'Content types' list, choose 'Text' > 'XML' > 'MyBatis XML Mapper'.
  4. Click 'Add...' button on the right side of 'File associations' list.
  5. Enter '*.sqlx' and press 'OK' to close the 'Define New Content Type Association' dialog.
  6. Click 'Apply and Close' button to close 'Preferences' dialog.
  7. Re-open the .sqlx file if it is already open.

I just tested and it seems to be working mostly.

Note that there is an open issue #106 which prevents MyBatipse from function properly in the latest version of Eclipse (2020-06).

@lotte-medic
Copy link
Author

lotte-medic commented Aug 5, 2020

Thanks for your kindness. ^^ But, It doesn't work.
When I re-opend .sqlx file, It works with XML editor.
But I clicked with Ctrl+mouse on service java file which is mapper method
It doesn't be shown 'Open in' menu. Can you test it ? Help me more,.......please~~~

@harawata
Copy link
Member

harawata commented Aug 6, 2020

Yeah, I remembered I assumed the extension to be '.xml' in several places.
I will take a look if I get a chance, but I cannot say 'when'.

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

No branches or pull requests

2 participants