简体   繁体   English

Aptana中的项目浏览器预览

[英]Projects Browser Preview in Aptana

I installed Aptana Studio 3 (Mac) and I would want to manage projects like I can do with Dreamweaver , that is I can define a local (testing) server for each project with a dedicated url: this could be localhost/projectname or projectname.local using virtual hosts. 我安装了Aptana Studio 3 (Mac) ,我想像管理Dreamweaver一样管理项目,也就是说,我可以为每个项目定义一个具有专用URL的本地(测试)服务器:这可以是localhost / projectnameprojectname。本地使用虚拟主机。 The second option (virtual hosts) would be very appreciated. 第二种选择(虚拟主机)将不胜感激。

I would want to click-preview (clicking the run button or something similar) any file in a project with the default setting of the related project. 我想使用相关项目的默认设置单击预览(单击运行按钮或类似按钮)项目中的任何文件。

Can anyone help me? 谁能帮我?

My attempts with Apache MAC OSX Mountain Lion: 我对Apache MAC OSX Mountain Lion的尝试:

Web Project: I created a web project and I added two html files, then I set up preview settings of the project (adding a simple web server called 'ApacheServer' with http://localhost and document root). Web项目:我创建了一个Web项目,并添加了两个html文件,然后设置了该项目的预览设置(添加了一个名为“ ApacheServer”的简单Web服务器,带有http://localhost和文档根目录)。 But if I apply this setting this seems to be override from aptana default 'Built-in server', because when I come back to property panel 'Built-in server' is selected'. 但是,如果我应用此设置,那么它似乎会被aptana默认的“内置服务器”所覆盖,因为当我回到属性面板时,“内置服务器”已被选中。 When I click on "run" from the menu or from the "play button" it starts always the browser using 'Built-in server'. 当我从菜单或“播放按钮”单击“运行”时,它将始终使用“内置服务器”启动浏览器。 Ok I view the page but with default settings, my settings are ignored!? 确定,我可以查看页面,但是使用默认设置,我的设置将被忽略! I think that I have to create a web browser configuration clicking on "run configuration" and choosing the created web server (I had to create external web server because simple web server cause problem 'Generic server doesn't support start').. However now I have my browser configuration but the only way to use it on each page in the project is to select the dropdown list near the "play button" and select my browser configuration...uncomfortable :) If I click directly on "play button" the page start with default browser configuration! 我认为我必须创建一个Web浏览器配置,然后单击“运行配置”并选择创建的Web服务器(我必须创建外部Web服务器,因为简单的Web服务器会导致“通用服务器不支持启动”问题)。现在我有了我的浏览器配置,但是在项目的每个页面上使用它的唯一方法是选择“播放按钮”附近的下拉列表,然后选择我的浏览器配置...不舒服:)如果我直接单击“播放按钮”页面以默认浏览器配置开始! Can't I set a default browser configuration (created by me) for a single project? 我不能为单个项目设置默认的浏览器配置(由我创建)吗?

PHP Project: I created a php project and I added two php files, when I open a file and click "run" it doesn't open this page but it opens last page run (this could be a preference setting, i have to check). PHP项目:我创建了一个php项目,并添加了两个php文件,当我打开文件并单击“运行”时,它不会打开此页面,但会打开最后一个页面运行(这可能是首选项设置,我必须检查一下)。 If I right click on the file in the projects tree and then I click run as server it asks me the launch url. 如果右键单击项目树中的文件,然后单击“作为服务器运行”,它将询问我启动URL。 But this launch url is the last used, not a default launch url set for the project…so also this is uncomfortable ;) Here I noticed that in "run configurations" aptana creates each run page and store there launch url settings. 但是此启动URL是最后使用的,不是为项目设置的默认启动URL…因此也不舒服;)在这里,我注意到aptana在“运行配置”中创建了每个运行页面并存储了启动URL设置。 So it seems that aptana setup run/preview configuration foreach page and not for each project, or however a default launch configuration can't be set different for every project… 因此,似乎aptana为每个页面而不是每个项目都设置了运行/预览配置,或者不能为每个项目都设置不同的默认启动配置…

Anyone knows how to do that or has some ideas? 有谁知道该怎么做或有什么想法? Ultimately I would want that every page in a project could be launched using a default preview configuration in an external browser. 最终,我希望可以使用外部浏览器中的默认预览配置来启动项目中的每个页面。 This configuration should be different for each project (this could be useful having different urls for each projects using virtual hosts configuration. 对于每个项目,此配置应该不同(使用虚拟主机配置为每个项目使用不同的url可能很有用。

I found a possible solution: In "run configuration" you can create a web browser configuration for each project, setting up dedicated url for each project (using option "use base url"). 我找到了一个可能的解决方案:在“运行配置”中,您可以为每个项目创建一个Web浏览器配置,为每个项目设置专用的URL(使用选项“使用基本URL”)。 Then when you want to view a page in the browser you can click the dropdown near the "play button" and select related browser preview configuration. 然后,当您想在浏览器中查看页面时,可以单击“播放按钮”附近的下拉菜单,然后选择相关的浏览器预览配置。 If you don't find a configuration in the dropdown you have to launch it first from "run configuration" window. 如果在下拉菜单中找不到配置,则必须首先从“运行配置”窗口中启动它。

I don't understand so much run/preview configurations and the difference between browser preview and "run as php server"...perhaps you have to setup a run configuration (and not web browser) if you want to debug? 我不了解太多的运行/预览配置以及浏览器预览和“以php服务器运行”之间的区别...如果要调试,可能必须设置运行配置(而不是Web浏览器)?

I know how dreamweaver works and I thought that Aptana could manage websites and preview (for each project) but perhaps I was wrong!? 我知道Dreamweaver的工作原理,我认为Aptana可以管理网站和预览(针对每个项目),但也许我错了!? :) :)

Someone knows something about it and how to configure them? 有人对此有所了解,以及如何对其进行配置? Can you explain some "case studies" about how you manage launch preview and run mode when you work with aptana? 您能否解释一些与aptana一起使用时如何管理启动预览和运行模式的“案例研究”?

thanks bye 谢谢再见

Check out the link below, in the last section they are doing something similar to what you want. 请查看下面的链接,在最后一节中,他们正在做与您想要的类似的事情。 The settings are bound to Aptana so OS platform should not be an issue. 这些设置绑定到Aptana,因此OS平台应该不是问题。 http://www.htmlgoodies.com/html5/tutorials/aptana-studio-3-guided-tour-and-tutorial-create-a-web-project-using-the-html-5-boilerplate-framework.html#fbid=N9B8varcFW1 http://www.htmlgoodies.com/html5/tutorials/aptana-studio-3-guided-tour-and-tutorial-create-a-web-project-using-the-html-5-boilerplate-framework.html# fbid = N9B8varcFW1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM