Auto Code Formatting in 10G
Hi-
Is there any way to change how Jdev 10g auto-formats code? For instance, if I enter a new function:
public void foo() {[enter]
Jdev automatically converts this to:
public void foo()
|[cursor]
I like my opening curly brace on the same line as the declaration - is there any hope? I see that I can modify the code templates, but these do not seem to be involved in the auto formatting.
Thanks,
Eric Everman
USGS
I can't get this to work! It doesn't matter what settings I select on the tools->preferences->Code editor->Java page, it doesn't seem to make any difference.
For example, if I select "On the Same Line", deselect "Add Closing Brace Automatically" and deselect "Move Open Brace To Match Preferred Style" it still moves the open brace onto it's own line. Anyone else having this problem, or found a way to fix it?
Thanks
Vince
Similar Messages
-
My auto-indent and code formatting is not working.
Usually on dreamweaver CS5.5 my code (html) would indent my <div> tags and align them up with the end div </div>. Not only were the <siv> tags formateed but various of others tags were as well.
How Dreamweaver used to format my code:
<head>
<title>Example</title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
</head>
<body>
<div id="outside_container">
<div id="container">
<a href="#"><img src="images/logo.jpg" id="logo" /></a>
<ul id="menu">
<li><a href="#"></a></li>
<li><a href="#"></a></li>
<li><a href="#"></a></li>
</ul>
<ul id="right_menu">
<li><a href="#">t</a></li>
<li><a href="#">t</a></li>
</ul>
<img src="images/panel_home.jpg" id="panel" />
<div id="content">
<div class="column1">
<h2>Text</h2>
<p>Text Here</p>
</div>
Now it does not even format it so all of my code aligns on the left like so:
<head>
<title>Example</title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
</head>
<body>
<div id="outside_container">
<div id="container">
<a href="#"><img src="images/logo.jpg" id="logo" /></a>
<ul id="menu">
<li><a href="#"></a></li>
<li><a href="#"></a></li>
<li><a href="#"></a></li>
</ul>
<ul id="right_menu">
<li><a href="#">t</a></li>
<li><a href="#">t</a></li>
</ul>
<img src="images/panel_home.jpg" id="panel" />
Can anybody please help me?Did you try Edit > Preferences > Code Format > Indent?
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/
http://twitter.com/altweb -
I have had an iphone 3, 4, 4S, and now a 5. Every picture I have ever taken is saved as "photo". How do I change the auto naming format to a more sequential name?
There is no way to change this.
-
Oracle bi error codes u9kp7q94 OBIEE 10g
Hi All,
I have created new user in RPD(Online Mode).
Then i have loged into Answer.It throws error
"oracle bi error codes u9kp7q94 OBIEE 10g"
How to fix.
Thanks
GramRaj wrote:
Hi All,
I have created new user in RPD(Online Mode).
Then i have loged into Answer.It throws error
"oracle bi error codes u9kp7q94 OBIEE 10g"
How to fix.
Thanks
GramAre you getting this error on the login screen? or when you are opening a report? -
Auto code completion settings for new ABAP Editor
Dear all,
I am working in New ABAP editor but i am unable to set auto code completion,
please tell about customising of new ABAP editor for Auto code completion.
Thanks and regards,
Gaurav SoodHello,
1. Choose Utilities ® Settings.
The User-Specific Settings dialog box appears.
2. Choose ABAP Editor.
3. Set the new editor mode.
From:
http://help.sap.com/saphelp_nw04s/helpdata/en/43/29dee414483fe1e10000000a11466f/frameset.htm
Regards,
Jorge Diogo -
OCI code executed in 10g leaves file desc. open (ocius.msb) during errors
If an application program encounters an error in database, the following file is left open:
/opt/oracle/product/10.2.0/rdbms/mesg/ocius.msb
Once the number of open file descriptors exceeds the maximum set in the host (ulimit -n 1024),
no more files can be opened.
This behavior is observed ONLY FOR OCI code running on 10g. The latest OCCI code
did not leave this file open, upon error conditions.
The issue indicated in BUG ID 2463295 is not exactly same as this. (oraus.msb vs. ocius.msb) and (condition triggering the defect is different)
We are using Oracle 10g on Solaris 10 operating system. Is this a known limitation or being fixed in any of the latest 10g patches?
Message was edited by:
user498920Haven't looked at this but it appears that it could affect usage of any message binary (MSB) files where an error occurs. If I get a chance, I'll look into it further and report it.
-
Code Formating after Forum Software Upgrade
Hello SCN Forum Administrators,
it seems that all code formating which was done with the
[code]
Tags was not automatically converted during the Forum Software Upgrade. What can I do to correct my code in the Forum Topic Re: Display ALV GRID with PHP? The message was posted by myself but I can't edit it.
Best regards
GregorHi all,
the new forum version does contain a filter that can handle the old [code] tags. The problem was that we had to turn it off because it permanently ran into Stackoverflow errors and thus bringing the whole landscape into trouble.
Now we have to convert all the old [code] markup in all messages with the new {code} markup. We are currently testing this.
In other words: [code] is no longer supported, the usage of {code} is recommended.
Regards,
Michael -
hi,
i am using following query for auto code generation group wise
declare @temp as char(20)
IF $[OITM.ItmsGrpCod] = 101
BEGIN
set @temp=(select isnull(max(right(ItemCode,6)),0) + 1 from OITM where (ItmsGrpCod= 101) and (len(ItemCode)=7))
set @temp='FAB'+isnull(replicate(0,6-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
ELSE IF $[OITM.ItmsGrpCod] = 104
BEGIN
set @temp=(select isnull(max(right(ItemCode,6)),0) + 1 from OITM where (ItmsGrpCod= 104) and (len(ItemCode)=7))
set @temp='BRD'+isnull(replicate(0,6-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
but this does not increment code automatically every time it shows me FAB000001 and BRD000001
thanks
rahulSolved
-
Code formatting, indenting, and commenting
This question was posted in response to the following article: http://help.adobe.com/en_US/flashbuilder/using/WSe4e4b720da9dedb5-25a895a612e8e9b8c8e-7fff .html
MXML code formatting options are very limited in Flash Builder 4.5. Compare that to the vast amount of options you have to format Java code in Eclipse. I would expect more from a proprietary software.
-
Code formatting made thing worse
After CTRL+ALT+L (Code Reformat) in JDeveloper 11g, things got worse:
Eg.:
http://i.imgur.com/pEKtS.png
Normally it should like this (at least this is how other IDEs are reformatting code):
http://imgur.com/MRSW0
or this:
http://i.imgur.com/Dkyry.png
I've tried to fine-grain code formatting from: Tools -> Preferences -> Code Style but the results weren't satisfactory .
Does anyone know where i can find a Code Style profile .xml file that won't mess the looks of my code, just like the default one did ?Hi,
in 11.1.1.5, I quickly created
public void mytest() throws FileNotFoundException {
List credentialFiles = null;
for (File f: credentialFiles){
fis = new FileInputStream(f);
String name = f.getName();
new Departments(new Long(2236),
"Sales 33",
new Long(100),
new Long(200),
new EmployeesList());
}Then I hit ctrl-alt-l and the outcome s
public void mytest() throws FileNotFoundException {
List credentialFiles = null;
for (File f : credentialFiles) {
fis = new FileInputStream(f);
String name = f.getName();
new Departments(new Long(2236), "Sales 33", new Long(100),
new Long(200), new EmployeesList());
}Its not really what I would call worse
Frank -
Code Formatting Instructions for Developer Forums
Although this topic only applies to the two Developer forums, the need for some upfront code formatting instructions in those forums is desperate. There may be hundreds of threads which include one or more messages on this subject. In my case alone, I've posted at least a dozen messages each containing these three lines:
Paste your code here.
Of course a quick search of either Dev forum on the keys +code formatting+ will find the above right away, but those who need help the most don't know code requires special formatting so won't be making that search. For the same reason, neither the excellent instructions in the User Tips Library nor the pertinent threads in this forum are likely to be discovered before they're needed. The +Help & Terms of Use+ FAQ might seem to be a good place for the instructions, but this has been proposed so many times before I'm sure it will never happen. The need is confined to the Dev forums afterall.
I think the solution would be a permanent post (similar to +How to Post a new Topic+ in this forum) at the top of both Dev forums. I don't think most developers want to see instructions on any other topic at the top of the forums, but a brief note titled +How to Post Code+ might make everyone's life easier.
Assuming most of the other developers agree, how could we make this happen?Thanks so much for helping with this, Nubz!
Joerg's instructions are excellent. I refer to them often and I've had them bookmarked since I found Apple Discussions last year. The new Code section is great!! Very clear!
Now we just need to find a way to get users to that page. Our problem has never been with users who are interested enough in Apple Discussions to visit the Tips Library. The unformatted code is coming from first-time users--not necessarily novice coders, but programmers of all skill levels who aren't coming here to learn about the forums or relate to the community. These folks are focused on their current project, may have found no answers anywhere else, and arrive here with tunnel vision. Often there's a language problem as well.
The newly arrived OP will often start the thread with a page of unformatted code. Those of us with eyes used to filling in the missing brackets, indentation etc. can sometimes decypher the mess, but usually we need to give formatting instructions and ask the OP to repost. The frequency of this scenario has been increasing. Lately I've been posting those instructions almost once every day.
Of course that's a good sign! We've been giving good service down there and the number of newcomers seems to be reflecting that. A big percentage have turned into regulars, so I think we have a very healthy forum. It's just the formatting cycle gets old, and the time and bytes add up too.
My suggestion is this:
One yellow moderator announcement that stays in the first position on the topic page for both dev forums. The subject line is:
To format code: Paste your code here
The user doesn't even need to open the message. Only developers will see this. No change to the page header is needed. If the user does open the message, a link will be provided to Joerg's tips.
- Ray -
Is the code formatting buggy or is it just that I cannot seem to find the correct mix of settings? I hope it is the latter and that someone here may know how to get it
After setting the settings I think I want I get a simple SQL formatted like this.
{noformat}
select username
,sid
,serial#
from v$session
where sid = 11
and(status = 'ACTIVE'
or status = 'INACTIVE')
{noformat}Ignore the fact that the actual query may not be logical...
The first problem is that the different columns are lined up to the left and not indented lika I would like them to be.
The second (and much less important) is that the and/or are not indented like the keywords. I'd like to get the SQL to be formatted like this.
{noformat}
select username
,sid
,serial#
from v$session
where sid = 11
and(status = 'ACTIVE'
or status = 'INACTIVE')
{noformat}How can I make the code formatting result in the above SQL (especially the aligning of the columns)?Turloch,
Thank you for the reply. I figured this may be a bug, so it is nice to have it confirmed. I can live with it not being correct as long as a fix will show up eventually.
The problem with using tabs or large settings for space is that it causes other parts of PLSQL to look to spread out. One thing that happens is that the right justification of the keywords gets messed up. But I can make soem SQL look OK with it, but that is at the expense of getting other ones to not look good. For example if I get the columns to line up with a leading comma, the concatenation is not correct and vice versa. I also get SQL to look better, but then indentation in PLSQL is too agressive and looks very bad.
I would like to be able to set and/or to be set to be handled as keywords so they too can be right justified. Columns (whether or not concatenated or separated with a comma) should be possible to align with the column in which the first column starts.
While I'm at it, there seems to be an issue with the formatting of keywords such as inner join. I think inner too should be considered keywords so it can be right justified with other keywords. Same thing with subselects, they end up the the left of the right column of the keywords.
I think the formatting features are really good now. There is still room for improvement to be able to control it enough to make it look exactly like I want, but it is getting close and flexible enough to allow many different ideas of how the template should be to be configured.
Thanks,
Mathias -
Business partner auto code generation
hi how to create business partner auto code generation. its based on customer group for example we have more customer group..dealer, distributor,subcontractor...
here dealer and distributor group starting cardcode is - C000001,C000002,C000003..... etc
when i was choose subcontractor its starts SUB00001,SUB00002...... etc
vendor is maintain same starting letter in all groups V000001,V000002
Thanks in advance
Thanks & Regards
B.Lakshmi Narayananhi thanks for your valuable replies...
i changed the codes...pls check its right or wrong
declare @temp as char(20)
IF $[OCRD.GroupCode] = 104 and $[OCRD.cardtype] = 'c'
BEGIN
set @temp=(select isnull(max(right(cardCode,7)),0) + 1 from Ocrd where (groupcode= 104) and (len(cardCode)=7))
set @temp='TRA'isnull(replicate(0,7-len(@temp)),'')@temp
select cast(@temp as char(20))
END
ELSE IF $[OCRD.cardtype] = 'C'
BEGIN
set @temp=(select isnull(max(right(cardCode,7)),0) + 1 from Ocrd where (len(cardCode)=7))
set @temp='C'isnull(replicate(0,7-len(@temp)),'')@temp
select cast(@temp as char(20))
END
ELSE IF $[OCRD.cardtype] = 'S'
BEGIN
set @temp=(select isnull(max(right(cardCode,7)),0) + 1 from Ocrd where (len(cardCode)=7))
set @temp='S'isnull(replicate(0,7-len(@temp)),'')@temp
select cast(@temp as char(20))
END
Thanks & Regards
B.Lakshmi Narayanan -
Dreamweaver CS3 Code Formatting broken
Hello, I am experiencing a huge deal of frustration with the
way Dreamweaver improperly formats code. In particular, the UL / LI
tags do not format correctly. Here is what I am trying to achieve:
<ul>
<li>
TEXT
</li>
</ul>
Now this pattern seems to correspond exactly to the preview
that you see when you go to Preferences > Code Format > Tag
Libraries, select the LI tag and choose Line Breaks: Before,
Inside, After and Contents: Formatted and Indented.
I have done this. I have also manually checked the .vtm file
in username > Application Data > Adobe > Dreamweaver >
Configuration etc.... and it corresponds to what I have set in the
Prefs.
However, when I use Design View to create the unordered list,
OR even if I just TOUCH a properly formatted list in Design View,
everything gets squeezed onto one line. I get this sort of thing:
<ul> <li>TEST</li> <li>MORE
TEST</li> </ul>
Here is what I have tried unsuccessfully to date:
1. Prefs > Code Formatting > Edit Tag Libraries...
2. Prefs > Code Format > UNCHECK Do not include a break
inside TD tag (I know, that's for TD, but I'm just trying
everything(
3. Prefs -> line breaks (tried Unix, Windows)
4. Commands > Apply Source Formatting (messes up my entire
code by putting everything inside the BODY tag on one line - in
other words, my entire page goes on one line now!)
5. Automatic Wrapping After Column 76 - this one is really
stupid, it just does a HARD break on each line so when you turn it
back off you have to go in and manually delete all these hard
breaks now...
There's a bunch of other small things I have tried, but
needless to say, nothing appears to be working.
Has no one else experienced this? Can you get Design View to
properly format UL / LI tags? If so, then something on my computer
is messed. But when I look at code generated by DW on some of my
co-workers' computers, they also have the same problem - I just
guess their tolerance for crappy code is higher than mine.
I'm using DW 9.0 (CS3) build 3481.
Please help! I have no hair left on my head to tear out and I
may have to go further afield.... ouch!
Thanks,
TomI just checked on DW CS4 and it's working as expected. If I
change my LI
entry in the Tag Libraries to Line Breaks: Before, Inside,
After and
Contents like you, I get your desired effect. Moreover, it
doesn't revert -
or worse if any changes are made, whether in Design or Code
view. I know
this doesn't help you verify or correct your CS3 issue, but
at least you
know there is an upgradeable light at the end of the tunnel.
Best - Joe
Joseph Lowery
VP of Product Management, WebAssist -
http://www.webassist.com
Author, Dreamweaver CS3 Bible -
http://www.idest.com/dreamweaver/
"tomaugerdotcom" <[email protected]> wrote
in message
news:[email protected]...
> Hello, I am experiencing a huge deal of frustration with
the way
> Dreamweaver
> improperly formats code. In particular, the UL / LI tags
do not format
> correctly. Here is what I am trying to achieve:
>
>
> TEXT
> </li>
>
>
> Now this pattern seems to correspond exactly to the
preview that you see
> when
> you go to Preferences > Code Format > Tag
Libraries, select the LI tag and
> choose Line Breaks: Before, Inside, After and Contents:
Formatted and
> Indented.
>
> I have done this. I have also manually checked the .vtm
file in username >
> Application Data > Adobe > Dreamweaver >
Configuration etc.... and it
> corresponds to what I have set in the Prefs.
>
> However, when I use Design View to create the unordered
list, OR even if I
> just TOUCH a properly formatted list in Design View,
everything gets
> squeezed
> onto one line. I get this sort of thing:
>
TEST</li>
MORE TEST</li>
>
> Here is what I have tried unsuccessfully to date:
>
> 1. Prefs > Code Formatting > Edit Tag Libraries...
> 2. Prefs > Code Format > UNCHECK Do not include a
break inside TD tag (I
> know,
> that's for TD, but I'm just trying everything(
> 3. Prefs -> line breaks (tried Unix, Windows)
> 4. Commands > Apply Source Formatting (messes up my
entire code by putting
> everything inside the BODY tag on one line - in other
words, my entire
> page
> goes on one line now!)
> 5. Automatic Wrapping After Column 76 - this one is
really stupid, it just
> does a HARD break on each line so when you turn it back
off you have to go
> in
> and manually delete all these hard breaks now...
>
> There's a bunch of other small things I have tried, but
needless to say,
> nothing appears to be working.
>
> Has no one else experienced this? Can you get Design
View to properly
> format
> UL / LI tags? If so, then something on my computer is
messed. But when I
> look
> at code generated by DW on some of my co-workers'
computers, they also
> have the
> same problem - I just guess their tolerance for crappy
code is higher than
> mine.
>
> I'm using DW 9.0 (CS3) build 3481.
>
> Please help! I have no hair left on my head to tear out
and I may have to
> go
> further afield.... ouch!
>
> Thanks,
>
> Tom
> -
Jdeveloper: Tool Preferences Code Editor Save Actions. Why no code format?
For me Format and Organize Imports are the 2 main save actions?
Can I write a plugin or something to have the code format working for me?
Best Regards,
JPWhich version of jdev you are talking about?
In 11.1.1.2.0 I can select reformat as save action.
Timo
Maybe you are looking for
-
How to include Add-On in EHP4 Installation
This is a fresh install on Unix and Oracle. We have already installed ERP 6.0 EHP4 Ready and now preparing for EHP4 Install using EHP Installer. We have two Add-Ons CPRXRPM 400 and ECC-SE 604 that we want to include in EHP4 installation. We have alre
-
Convert all VARCHAR2 data types to character length semantics
Hi, I am wondering if there is an easy way to convert all columns in the database of data type VARCHAR2(x BYTE) to VARCHAR2(x CHAR)? Regards Håkan
-
I am trying to use weblogic 5.1 as my HTTP server and EJB Server, the problem I am facing is I have <link type="text/css" scr="stylesheet.css"> as first line of code in all my jsps when I try to access these JSPs from the server its printing the css
-
I devlop a software using Developer 2000, during entry i need sum of the existing and newly enterd values, i made it to first save in a table, but meanwhile operator makes an error and whishes to re-correct the entry that has been alredy saved, what
-
I'm trying to display a TIF file using JIMI. I'm getting the file in through a Byte[] and converting to image and then adding the image to a JimiCanvas, but its not displaying at all. Heres my code so far: //Receiving byte[] iA