Skip to Content

NWDS 7.5 - Auto import for Web Dynpro imports above @@begin imports and deleting while build

Hello Experts,

I'm using NWDS 7.5 SP10 Patch 15 on Window 7 (I know that Windows 7 is not officially supported and maybe this is the problem...)

SAP JVM 8.1 is used.

I'm developing Web Dynpro application.

When using auto import (Ctrl Shift O) it puts the import statements above the @@begin imports section and when it rebuilds it deletes the statements (the delete part is standard behavior but why it puts the statements in the wrong place?)

The workaround is very simple: disable build automatically and copy the statements to the begin imports section.

Can someone suggest a better solution to this issue?

Regards,
Omri

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    Jan 15 at 11:27 AM

    Solved it by installing NWDS 7.5 SP13 Patch 3 (tested on Windows 7)

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 07 at 01:58 PM

    Hi Omri,

    This is really strange. Is this happening with other versions of NWDS as well? If you have chance I would double check it with Windows 10 as well.

    Best regards,
    Szabolcs

    Add comment
    10|10000 characters needed characters exceeded

    • Thanks.

      I checked with two versions on two workstations (windows 7) : NWDS 7.5 SP3 and 7.5 SP10 - same issue.

      It doesn't happen with 7.31 SP17 (same workstations).

      Unfortunately I don't have windows 10 )-:

      Regards,

      Omri

  • Jan 07 at 03:09 PM

    I quickly reproduced it. This "@@begin imports" is just a comment. It should not effect your code. BTW I had the same issue with 7.5 on Windows 10. and worked "normally" with NWDS 7.31.

    Regards,

    Szabolcs

    Add comment
    10|10000 characters needed characters exceeded

    • Hi, Thanks again.

      I didn't understand, were you able to solve it?

      As far as I know @@ is a directive for Web Dynpro so any code that's not between @@start and @@end is deleted.

      This is not a problem when I write the code, it's only a problem when auto import is combined with eclipse's auto build.

      Also, above the //@@begin imports it's written:

      // // IMPORTANT NOTE: // _ALL_ IMPORT STATEMENTS MUST BE PLACED IN THE FOLLOWING SECTION ENCLOSED // BY @@begin imports AND @@end. FURTHERMORE, THIS SECTION MUST ALWAYS CONTAIN // AT LEAST ONE IMPORT STATEMENT (E.G. THAT FOR IPrivateClearCacheView). // OTHERWISE, USING THE ECLIPSE FUNCTION "Organize Imports" FOLLOWED BY // A WEB DYNPRO CODE GENERATION (E.G. PROJECT BUILD) WILL RESULT IN THE LOSS // OF IMPORT STATEMENTS. //

      It's also written in 7.31 installations. The only difference is that 7.31 puts the import declarations in the correct location (as you saw).

      Regards,

      Omri