I
Currently I'm developing a code generator for Java and Actionscript3.
The generator works quiet well, but the Actionscript3 code isn't really nice.
For Java, there is an existing code beautifier integrated with xpand (MWE2 Workflow) but for Actionscript3 I cannot find anything.
Any idea? Perhaps someone have a ready to use AS3 code beautifier or knows a third party beautifier which may be integrated with xpand and MWE2 Workflow
Take a look at the uncrustify post-processor. It passes the generated output to a command line tool to produce the actual output with the desired indentation. If uncrustify itself doesn't suit you, the source code of the post-processor might help you to attach you own external tool.
After a long search, I have written a small beautifier at my own. It don't do much, only counting the { and indent as well as removing unnecessary line-breaks.
The result isn't really beautifully, but at least the code is more readable.
Thanks for the help
Try this http://jsbeautifier.org/ I know it's for JS ,but i tried and it worked.
Related
Does PhpStorm has a functionality to make code hard to read by making it one big mess?
I have HTML & JavaScript project which has lot's of code ready to be put in production use. I want to make it harder to read if someone is searching source code. I know there is pretty print features in browser to overcome this but still...
PHPStorm doesn't have any built-in functions for this. You might want to checkout phpprotector or YUI Compressor
I have a site that is calling a great deal of HTML from a third party source. Trouble is, I think they are returning malformed code to me.
I need a quick way to find additional DIV closures, is this possible?
create a page calling just the provided code then validate it - W3C Validator
Just install View shource chart add on for firefox and u can find the source generated in a formatted manner which is easy to find the unwanted tags..
You can try this:
http://www.tormus.com/en/tools/div_checker
Will find non matching divs for you. Very helpful
Try w3 org validator
While an IDE is not specifically mentioned, I would highly recommend putting the code into an IDE.
In Dreamweaver CS6 you can Validate directly to WC3 from within Dreamweaver. When an error is found you can go directly to that portion of the code and leverage the tools of the IDE.
As I was working on this project for a friend of mine who is terrified of changing from HTML to flash, I realized that maybe there could be a bridge between them. So I started working on a flash project that would grab the HTML from his page and parse it to display it in flash. Although I am sure there are resources available for this already, I figured that the experts on SO might be willing to suffer through the logic of one user trying to develop this script.
So basically, I am not asking for an answer, I am asking for some step-by-step direction that could be posted so other people could see the logic behind breaking down this project. I think it would be really useful (not just for me, but for anyone wanting to learn more about objects and oop).
So, much like the thread between primarily Senocular and Rampage, this would be a thread where I would be the student asking the questions in a logical step-by-step manner and someone else (or someones else) could provide guidance.
Let me know if you are interested and I can start by posting what I have already written. We can go from there and I am sure it will prove insightful to anyone who reads it. If no one is interested, or no one has the time or inclination, no problem.
Best wishes,
Jase
Who in their right mind would change from html to flash for displaying a simple website? I don't see the logic behind it, it's more like you are trying too hard. Flash has its function in the web, as well as html does. If it's just for simple displaying, using flash is just the wrong way and won't make your website any better but worse because its loading time will be too long.
Goole Search retrieved these:
HTMLWrapper
Groe.org HTMLParser
There is an article about the 1st on *drawlogic. I think the seconds' home is on sourceforge here.
Thing is, browsers already do a fine job at parsing html code. Having the flash player parse html files not only does away with any accessibility advantage your markup can offer but it also feels like reinventing the wheel. If you need to display html content, leave it to the browser.
Slightly offtopic - Flashpaper can convert most HTML pages into swf format.
Given properly "disciplined" HTML, you can use the XML parser in the player for the basic parsing. Are you really talking about writing an HTML renderer in Flash though? Or just being able to pull information from HTML dynamically?
In Flex Builder, when I create an .as file in a non-actionscript/flex project, the code hinting doesn't seem to work.
Is there a way to get code hinting to work when working on a .as file that's not part of an ActionScript/MXML project?
UPDATE:
The Outline functionality also doesn't seem to work in the same situation. It would be nice to get that working as well.
can't get it to work either ... this must be somehow related to eclipse's project/file management ...
if you really want to code AS3 however, than FlexBuilder really is not your IDE of choice ...
personally, i use FlashDevelop for AS3, but it needs windows ... it's worth virtualizing though ... also, it does a very smart completion on any as files and it supports AS2 and AS3, works quite alright with MXML, and provides rudimentary support for HTML, CSS, XML and PHP ...
apart from that, there seems to be quite a good textmate plug in for as3 ... but i really don't know of anything decent for linux ...
well, there's always FDT, but i somehow don't like it, and in my eyes it is too expensive for the features provided, that i'd use ...
greetz
back2dos
I am looking for a tool to display/track changes in text a little bit like it is done on stackoverflow when a question is edited. Does anybody know of a tool to achieve that?
You may want to use diff for that.
If you can use PHP on your server there's a handy pear package to perform the task you require. Here's an example :
https://web.archive.org/web/1/http://articles.techrepublic%2ecom%2ecom/5100-10878_11-6174867.html
There's actually a actually Javascript implementations outhere as well, not tested though:
http://ejohn.org/projects/javascript-diff-algorithm/
http://aignes.net/
Commercial tool though. I have no idea of a F/OSS alternative.
A copy of my own answer from here.
What about DaisyDiff (Java and PHP vesions available).
Following features are really nice:
Works with badly formed HTML that can be found "in the wild".
The diffing is more specialized in HTML than XML tree differs. Changing part of a text node will not cause the entire node to be changed.
In addition to the default visual diff, HTML source can be diffed coherently.
Provides easy to understand descriptions of the changes.
The default GUI allows easy browsing of the modifications through keyboard shortcuts and links.