emmetio / emmet-eclipse

Emmet for Eclipse
http://emmet.io
342 stars 74 forks source link

Update Image Size and Encode/Decode DataURL not working in Aptana 3 #14

Open danbrady opened 11 years ago

danbrady commented 11 years ago

I've tested the same process as the example page in both html and css files without any results. I don't see any errors but the tags do not get updated. All other Emmet functionality appears to work okay.

Just a clarification: I've tried bot the file menu options and keyboard shortcuts (after making sure there were no conflicts there) to attempt this.

Aptana Studio 3, build: 3.3.2.201302081546

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/1290567-update-image-size-and-encode-decode-dataurl-not-working-in-aptana-3?utm_campaign=plugin&utm_content=tracker%2F311127&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F311127&utm_medium=issues&utm_source=github).
sergeche commented 11 years ago

Make sure your image is accessible, e.g. it exists and it’s path can be resolved against active file (make sure it’s also saved and exists in your hard drive).

danbrady commented 11 years ago

Thanks for answer, Sergey. I've created a test project and put both the file (html) and image (png) in same location within the project and I'm still not seeing any results when running these commands. The files are saved and display correctly within the preview, a browser running locally, and on a web server. However, I'm not sure I understand if the path is being resolved to the active file within Aptana?

I'm not sure what else I could be doing wrong... unless it's some other system setting.

sergeche commented 11 years ago

How does path to image looks like? It’s absolute (<img src="/image.png">) or relative (<img src="image.png">)?

danbrady commented 11 years ago

The image path is relative. Both file and image are in the same directory. Thanks.

danbrady commented 11 years ago

An update on this issue:, if the file path is fully absolute, e.g. (<img src="http://127.0.0.1:8020/img/image.png"&gt;) then the Update Image Size and Encode data:URL features will work. But if it's relative to the file, they do not.

sergeche commented 11 years ago

If it works for absolute paths, then it can’t locate your image with relative path. Can you give me absolute paths of your HTML and image files?

danbrady commented 11 years ago

Ah, I think I've discovered the issue. It appears that if there are spaces in the file path to the project, Emmet cannot find the image, even if it's relative to the HTML.

My test: I created two new projects, one at 'C:\test\' and one at 'C:\test foo\'. In both projects the html and image files are both in these root folders and the image is coded relatively (e.g <img src="image.png"/>). In the 'C:\test' project, the image dimensions and dataURL are resolved correctly, but in the 'C:\test foo' project they do not.

Aptana, by default, sets up the folder for new projects to live here: C:\Users[userId]\Documents\Aptana Studio 3 Workspace\, which is what I was using when I discovered the issue. I bet the spaces in the last folder are causing these issues.

sergeche commented 11 years ago

Oh, thanks for research, I’ll try to fix it.