如何使用eclipse插件在java文件中创建自定义图像装饰器(How to create custom image decorator in java file using eclipse plugin)
我想在我的Eclipse插件中使用一些装饰器。 我创建了一个插件,我为自己的.test文件创建了自己的编辑器。 如果用户编辑.test文件并保存。 该文件必须显示一些装饰,不仅是.test文件,而且项目必须显示装饰器。 我坚持这个问题我找不到任何好的教程来创建装饰器。
我见过一些网站,如https://www.eclipse.org/articles/Article-Decorators/decorators.html,但我无法得到确切的观点。
有人请告诉我如何为我的eclipse插件创建自定义装饰器。
I would like to use some decorators in my Eclipse plugin. I have created a plugin where I created my own editor for my own .test file. If the user edits .test file and saves it. The file must show some decorations not only the .test file but also the project must show the decorator. I am stuck with this problem I can't find any good tutorial to create decorators.
I Have seen some of the websites like https://www.eclipse.org/articles/Article-Decorators/decorators.html but I couldn't get the exact point.
Will some one please tell me how to create custom decorator for my eclipse plugin.
原文:https://stackoverflow.com/questions/26379640
最满意答案
尾部斜杠的问题是它们可以修改查询。 例如:
http://mysite.com/index.php?par=this_query // is differente from http://mysite.com/index.php?par=this_query/
在最后一种情况下,$ _GET值有一个尾部斜杠,这通常会导致错误。
所以是的,有一些方法可以在.htacces文件中强制使用尾部斜杠,但这不是一个好主意。 在某些情况下,已经很难弄清楚如何删除它们,为什么要创建更多。
The problem with trailing slashes is they can modify the queries. For example:
http://mysite.com/index.php?par=this_query // is differente from http://mysite.com/index.php?par=this_query/
In the last case, the $_GET value has a trailing slash, which usually leads to error.
So yes, there are ways to force trailing slashes in .htacces files, but it is not a good idea. It's already hard to figure out how to remove them in certain cases, why creating more.
相关问答
更多-
更改www以检查实际域: #Force www. RewriteCond %{HTTPS} !=on RewriteCond %{HTTP_HOST} ^domain\.com$ [NC] RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] 或者,如果您托管了一堆域名,则可以在TLD之前检查名称: RewriteCond %{HTTPS} !=on RewriteCond %{HTTP_HOST} ^([^.]+)\.([a-z]{2 ...
-
尾部斜杠的问题是它们可以修改查询。 例如: http://mysite.com/index.php?par=this_query // is differente from http://mysite.com/index.php?par=this_query/ 在最后一种情况下,$ _GET值有一个尾部斜杠,这通常会导致错误。 所以是的,有一些方法可以在.htacces文件中强制使用尾部斜杠,但这不是一个好主意。 在某些情况下,已经很难弄清楚如何删除它们,为什么要创建更多。 The problem ...
-
对于站点根目录这样做.htaccess:
Options +FollowSymLinks -MultiViews RewriteEngine On RewriteBase / #www to non RewriteCond %{HTTP_HOST} ^www\.(([a-z0-9_]+\.)?domain\.com)$ [NC] RewriteRule ^(.+?)/?$ http://%1/$1/ [R=301,L] RewriteCond %{ ... -
.htaccess仅针对特定目录重写条件结尾斜杠(.htaccess rewrite condition trailing slash only for specific directories)[2019-12-12]
RewriteCond %{REQUEST_URI} ^/(courses|foo|bar)$ RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1/ [R=301,L] 应该在courses , foo和bar是您想要添加尾部斜杠的目录中工作。 RewriteCond %{REQUEST_URI} ^/(courses|foo|bar)$ RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1/ [R=301,L] Should work wh ... -
DirectorySlash on 将在适当的位置添加尾部斜杠。 DirectorySlash on will add a trailing slash where appropriate.
-
将其保存为.htaccess并将其放在“dave”目录中 RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !\..+$ RewriteCond %{REQUEST_URI} !/$ RewriteRule ^(.*)$ http://edit.mydomain.org/dave/$1/ [R=301,L] RewriteRule ^(.*)/$ $1.php [L] Save this as ...
-
以下工作。 我分成两个案例 - 一个没有尾随斜线并且需要重写的案例,以及它存在的地方,因此不需要额外的斜线。 RewriteEngine On RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteCond %{HTTP_HOST} ^markfisher.photo$ [OR] RewriteCond %{HTTP_HOST} ^www.markfisher.photo$ RewriteCond %{REQUEST_URI} !^/$ RewriteCon ...
-
这样做: Options +FollowSymLinks -MultiViews RewriteEngine On RewriteBase / RewriteRule ^index\.html$ / [R=301,L] RewriteRule ^(.+?)/index\.html$ $1/ [NE,R=302,L] ## hide .php extension # To externally redirect /dir/foo.html to /dir/foo RewriteCond %{TH ...
-
尝试这个, RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]*)/([^/]*)/([^/]*)\/$ /social/single_post.php?name=$1&t=$2&id=$3 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d R ...
-
您现有的重写规则中有一些丢失的标志和不正确的正则表达式。 你完整的.htaccess就是这样的: ErrorDocument 404 /404.php RewriteEngine on Options +FollowSymLinks -MultiViews RewriteBase / RewriteRule ^sort/([^/]+)/?$ index.php?by=$1 [L,NC,QSA] RewriteRule ^(profile)/([^/]+)/([^/]+)/?$ $1/$2?by=$3 ...