Why JD-GUI prefix each line with comment and line number?

I faced this problem several times. Whenever I decompile something and save all sources using JD-GUI, it prefix each line with a block comment and insert the line numbers for the code in the collection of methods. Here's an example from a jar that I just decompiled:

/*    */   public void onEnable()
/*    */   {
/* 25 */     List DropList = new ArrayList();
/* 26 */     DropList.add(Integer.valueOf(264));
/* 27 */     DropList.add(Integer.valueOf(57));
/* 28 */     DropList.add(Integer.valueOf(278));
/*    */ 
/* 30 */     this.config = getConfig();
/*    */ 
/* 32 */     this.config.addDefault("GiftDrops", DropList);
/* 33 */     this.config.addDefault("DropRate", Integer.valueOf(0));
/* 34 */     this.config.addDefault("GiftBoxPlayerSkin", "lol768");
/* 35 */     this.config.addDefault("CraftingRecipe.LineOne", "339,339,339");
/* 36 */     this.config.addDefault("CraftingRecipe.LineTwo", "339,264,339");
/* 37 */     this.config.addDefault("CraftingRecipe.LineThree", "339,339,339");
/*    */ 
/* 39 */     this.config.options().copyDefaults(true);
/* 40 */     saveConfig();
/*    */ 
/* 43 */     SkullMeta giftboxskull = (SkullMeta)this.giftbox.getItemMeta();
/*    */ 
/* 45 */     giftboxskull.setOwner(this.config.getString("GiftBoxPlayerSkin"));
/* 46 */     giftboxskull.setDisplayName(ChatColor.GREEN + "Gift Box");
/* 47 */     this.giftbox.setItemMeta(giftboxskull);
/*    */ 
/* 49 */     this.giftboxrecipe = new ShapedRecipe(this.giftbox);
/* 50 */     this.giftboxrecipe.shape(new String[] { "123", "456", "789" });
/*    */ 
/* 52 */     String[] LineOne = getConfig().getString("CraftingRecipe.LineOne").split(",");
/* 53 */     String[] LineTwo = getConfig().getString("CraftingRecipe.LineTwo").split(",");
/* 54 */     String[] LineThree = getConfig().getString("CraftingRecipe.LineThree").split(",");
/*    */ 
/* 56 */     this.giftboxrecipe.setIngredient('1', new ItemStack(Integer.parseInt(LineOne[0])).getData());
/* 57 */     this.giftboxrecipe.setIngredient('2', new ItemStack(Integer.parseInt(LineOne[1])).getData());
/* 58 */     this.giftboxrecipe.setIngredient('3', new ItemStack(Integer.parseInt(LineOne[2])).getData());
/* 59 */     this.giftboxrecipe.setIngredient('4', new ItemStack(Integer.parseInt(LineTwo[0])).getData());
/* 60 */     this.giftboxrecipe.setIngredient('5', new ItemStack(Integer.parseInt(LineTwo[1])).getData());
/* 61 */     this.giftboxrecipe.setIngredient('6', new ItemStack(Integer.parseInt(LineTwo[2])).getData());
/* 62 */     this.giftboxrecipe.setIngredient('7', new ItemStack(Integer.parseInt(LineThree[0])).getData());
/* 63 */     this.giftboxrecipe.setIngredient('8', new ItemStack(Integer.parseInt(LineThree[1])).getData());
/* 64 */     this.giftboxrecipe.setIngredient('9', new ItemStack(Integer.parseInt(LineThree[2])).getData());
/*    */ 
/* 66 */     getServer().addRecipe(this.giftboxrecipe);
/*    */ 
/* 68 */     getServer().getPluginManager().registerEvents(new GiftBoxEventListener(this), this);
/*    */   }

      

It seems like the JD-GUI feature is supposed to prevent people from using the source files they get by compiling. I can delete all these comments quite easily with the bash command, but it's still annoying. Is there a way to disable this functionality?

+3


source to share


1 answer


Under Help → Preferences, under Saving Sources, uncheck Show Line Numbers



+7


source







All Articles